This is the mail archive of the
cygwin
mailing list for the Cygwin project.
Re: C++11 program link failure under GCC 4.8.2-1
- From: zosrothko <zosrothko at orange dot fr>
- To: cygwin at cygwin dot com
- Date: Wed, 12 Mar 2014 12:12:13 -0700 (PDT)
- Subject: Re: C++11 program link failure under GCC 4.8.2-1
- Authentication-results: sourceware.org; auth=none
- References: <CAJygYd3KQEhdFBAYO4ONumf=FMvjH1fuiqa4b2F0XGLPBNv2Hw at mail dot gmail dot com> <528159F8 dot 2070307 at gmail dot com> <CAJygYd2H7tyjE73=EK2hdo2ZPvWtziU8sUkbgbo5crBtP3JRHQ at mail dot gmail dot com> <CAJygYd2UqXD3e-iguMUB1FUNDmCVmC5D7b1=zHqMVs1kJ8-+qw at mail dot gmail dot com> <5281F8D4 dot 4090809 at gmail dot com> <CAJygYd2TZkAnOFf67TEuQd0_V9Sgz8ZaZwVrVH6tusxRni-r3A at mail dot gmail dot com>
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