https://gcc.gnu.org/bugzilla/show_bug.cgi?id=71013

--- Comment #5 from John David Anglin <danglin at gcc dot gnu.org> ---
It seems on gnu systems, _GNU_SOURCE is defined in CPLUSPLUS_CPP_SPEC
irrespective of -std=gnu++98.  This is in gnu-user.h:

/* The GNU C++ standard library requires that these macros be defined.  */
#undef CPLUSPLUS_CPP_SPEC
#define CPLUSPLUS_CPP_SPEC "-D_GNU_SOURCE %(cpp)"

As a result, all C features through to C11 are enabled for c++ on at
least Debian unstable.

Is this correct?  I could do something similar for hpux so the macros
get defined.

Reply via email to