This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: egcs-1.1.1: name mangling and C library header files
- To: dje at watson dot ibm dot com
- Subject: Re: egcs-1.1.1: name mangling and C library header files
- From: "Martin v. Loewis" <martin at mira dot isdn dot cs dot tu-berlin dot de>
- Date: Wed, 28 Jul 1999 01:27:30 +0200
- CC: kevin dot broadey at eds dot com, gcc at gcc dot gnu dot org
- References: <9907271519.AA44918@marc.watson.ibm.com>
> I believe that all header files in the system header directory
> are assumed to be "C". This is one of the "special treatments"
> applied to the standard system directories.
This is not totally correct. System header directories can be marked
as cxx_aware, in which case header files inside are automatically
'extern "C"'. By default, no system directory is
cxx_aware. Target-specific macros can override this default, though.
Also, if system header directories are obtained from environment
variables, they become cxx_aware.
For details, I guess you have to consult the source code. After the
preprocessor, the compiler will recognise such a header by a value of
"4" in the line directive (instead of "3", which indicates normal
system header).
Regards,
Martin