This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug libstdc++/1773] __cplusplus defined to 1, should be 199711L
- From: "andrew at ishiboo dot com" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Wed, 3 Aug 2011 20:30:11 +0000
- Subject: [Bug libstdc++/1773] __cplusplus defined to 1, should be 199711L
- Auto-submitted: auto-generated
- References: <bug-1773-4@http.gcc.gnu.org/bugzilla/>
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=1773
--- Comment #105 from Andrew Paprocki <andrew at ishiboo dot com> 2011-08-03 20:26:17 UTC ---
$ uname -a
SunOS sun 5.10 Generic_137111-08 sun4v sparc SUNW,T5240 Solaris
$ CC -V
CC: Sun C++ 5.10 SunOS_sparc 128228-10 2010/08/18
$ g++ -dumpversion
4.5.2
$ cat > foo.cpp
#include <string.h>
int main() { char* foo = strchr("z", 'z'); return 0; }
$ CC -c foo.cpp
"foo.cpp", line 2: Error: Cannot use const char* to initialize char*.
1 Error(s) detected.
$ g++ -std=c++0x -pedantic -Wall -Wextra -Wno-unused -c foo.cpp
$