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]

Re: egcs-1.1.1: name mangling and C library header files


>>>>> "Broadey, Kevin M" writes:

Kevin> I'm running egcs-1.1.1 on an RS/6000 under AIX 4.2.1.
Kevin> I have a C++ program that #includes <sys/msg.h> and calls the "msgget"
Kevin> function.  And it works!

Kevin> This is surprising because /usr/include/sys/msg.h doesn't contain any
Kevin> 'extern "C"' directives, but the code links quite happily against the C
Kevin> library.

Kevin> Something within g++ must be deciding that sys/msg.h is a "C" header file
Kevin> and implicitly making all the function 'extern "C"'.  An I right about this?
Kevin> How do I find out which files are considered to be "C" header files?

	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.

David


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