This is the mail archive of the newlib@sourceware.org mailing list for the newlib project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Question about feature test macros


I was under the impression that 'g++ -std=gnu++11' would enable GNU extensions, but that doesn't seem to be the case. Here's a test on Cygwin:

$ cat temp.cc
#include <stdlib.h>

$ g++ -std=gnu++11 -E -dD temp.cc | grep GNU_VISIBLE
#define __GNU_VISIBLE 0

It seems that I have to explicitly define _GNU_SOURCE, even though I've used -std=gnu++11:

$ g++ -std=gnu++11 -D_GNU_SOURCE -E -dD temp.cc | grep GNU_VISIBLE
#define __GNU_VISIBLE 1

Is this a bug, or am I misunderstanding '-std=gnu++11'?

Ken


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]