[Bug c++/57025] New: Solaris g++ defines __STDC_VERSION__=199901L
jdemeyer at cage dot ugent.be
gcc-bugzilla@gcc.gnu.org
Sun Apr 21 14:04:00 GMT 2013
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=57025
Bug #: 57025
Summary: Solaris g++ defines __STDC_VERSION__=199901L
Classification: Unclassified
Product: gcc
Version: 4.7.2
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: c++
AssignedTo: unassigned@gcc.gnu.org
ReportedBy: jdemeyer@cage.ugent.be
Target: sparc-sun-solaris2.10
With GCC 4.7.2, when compiling C++ code in Solaris, the macro __STDC_VERSION__
is defined to be 199901L:
$ gcc -std=c++98 -x c++ /dev/null -E -dD |grep STDC
#define __STDC__ 1
#define __STDC_HOSTED__ 1
#define __STDC_VERSION__ 199901L
Despite this, the "restrict" keyword is not understood. This looks like a bug
to me: if the compiler defines __STDC_VERSION__=199901L, it should understand
C99 features like the "restrict" keyword. This only happens on Solaris as far
as I can tell.
More information about the Gcc-bugs
mailing list