Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 30 Jan 2024 19:43:33 +0000
From:      bugzilla-noreply@freebsd.org
To:        bugs@FreeBSD.org
Subject:   [Bug 276738] clang: static_assert conflicts with -std=c++98 -pedantic-errors
Message-ID:  <bug-276738-227@https.bugs.freebsd.org/bugzilla/>

next in thread | raw e-mail | index | archive | help
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=3D276738

            Bug ID: 276738
           Summary: clang: static_assert conflicts with -std=3Dc++98
                    -pedantic-errors
           Product: Base System
           Version: 14.0-STABLE
          Hardware: Any
                OS: Any
            Status: New
          Severity: Affects Only Me
          Priority: ---
         Component: bin
          Assignee: bugs@FreeBSD.org
          Reporter: henri@henrimenke.de

Clang cannot compile the following file

#include <stdint.h>
#include <algorithm>

with the command

c++ -std=3Dc++98 -pedantic-errors -c test.cpp

with an error similar to

In file included from /usr/include/c++/v1/algorithm:1712:
In file included from /usr/include/c++/v1/memory:842:
In file included from /usr/include/c++/v1/__algorithm/move.h:12:
/usr/include/c++/v1/__algorithm/iterator_operations.h:101:9: error: too many
arguments provided to function-like macro invocation
        "It looks like your iterator's `iterator_traits<It>::reference` does
not match the return type of "
        ^
/usr/include/sys/cdefs.h:284:9: note: macro '_Static_assert' defined here
#define _Static_assert(x, y)    __Static_assert(x, __COUNTER__)
        ^

--=20
You are receiving this mail because:
You are the assignee for the bug.=



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?bug-276738-227>