This is the mail archive of the gcc@gcc.gnu.org mailing list for the GCC project.


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

_GNU_SOURCE defined for g++, not for gcc


hi there,

in of of the most recent compiler snapshots there the _GNU_SOURCE
macro is defined implicitely when calling 'g++', but not 'gcc'.
What is the reason for this ? Is there anywhere a table of symbols
that are defined (per platform and compile time switch) ?

I'm working on an autoconf based build system, where I test for
the presence of declarations such as 'strsignal'. It now happens
that this function is declared if the above symbol is defined.
If I use the typical autoconf setting, where such tests are performed
with cc, I therefor don't see the symbol. As a consequence, I declare
it myself in a config.h file, which then leads to a clash when I compile
my application with 'c++', which then sees two separate declarations.

What is the correct fix for this problem ? Do I need to use AC_LANG_CPLUSPLUS
for all autoconf tests ?

Regards, 
Stefan


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