This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug libstdc++/51705] New: Build infrastructure should not use -std=c++0x until g++ properly supports it
- From: "ed at 80386 dot nl" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Thu, 29 Dec 2011 19:20:09 +0000
- Subject: [Bug libstdc++/51705] New: Build infrastructure should not use -std=c++0x until g++ properly supports it
- Auto-submitted: auto-generated
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=51705
Bug #: 51705
Summary: Build infrastructure should not use -std=c++0x until
g++ properly supports it
Classification: Unclassified
Product: gcc
Version: unknown
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: libstdc++
AssignedTo: unassigned@gcc.gnu.org
ReportedBy: ed@80386.nl
FreeBSD recently added support for C11 and C++11 keywords to its sys/cdefs.h
file. This header file is used by FreeBSD header files and source code to write
code that is portable across different compiler versions.
GCC 4.7's build system adds -std=c++0x to the compiler to build libstdc++. This
means that code is built with __cplusplus == 201103L. This is wrong, because
now sys/cdefs.h starts to use C++11 constructs such as [[noreturn]].
[[noreturn]] is not supported by GCC yet.
Essentially GCC is free to announce __cplusplus == 201103L for its experimental
C++11 support, but the C++11 support should not be used during its own
compilation step if it's not finished yet.
Alternatively, this could be fixed by simply implementing [[noreturn]], of
course, but that's a different issue altogether.