C++11 program link failure under GCC 4.8.2-1

zosrothko zosrothko@orange.fr
Wed Mar 12 21:05:00 GMT 2014


Hi

Below are the compile time __STRICT_ANSI__ defines for various standards
supported by g++

FrancisANDRE@idefix /usr/include
$ gcc -xc++ -std=c++0x -dM -E - < /dev/null | grep ANSI
#define __STRICT_ANSI__ 1

FrancisANDRE@idefix /usr/include
$ gcc -xc++ -std=c++11 -dM -E - < /dev/null | grep ANSI
#define __STRICT_ANSI__ 1

FrancisANDRE@idefix /usr/include
$ gcc -xc++ -std=gnu++11 -dM -E - < /dev/null | grep ANSI

FrancisANDRE@idefix /usr/include
$ gcc -xc++ -std=c++98 -dM -E - < /dev/null | grep ANSI
#define __STRICT_ANSI__ 1

All but c++11 define __STRICT_ANSI__. That's why your sample does not
compile. This a issue with the cygwin includes that should provide snprintf
for c++11 also not only for other standards.



--
View this message in context: http://cygwin.1069669.n5.nabble.com/C-11-program-link-failure-under-GCC-4-8-2-1-tp104247p107069.html
Sent from the Cygwin list mailing list archive at Nabble.com.

--
Problem reports:       http://cygwin.com/problems.html
FAQ:                   http://cygwin.com/faq/
Documentation:         http://cygwin.com/docs.html
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple



More information about the Cygwin mailing list