Targets using implicit extern "C"

Stan Shebs shebs@apple.com
Tue May 10 23:04:00 GMT 2005


Joe Buck wrote:

>On Tue, May 10, 2005 at 02:26:12PM -0400, Ian Lance Taylor wrote:
>
>>How would people feel about adding a configure option
>>--with-implicit-extern-c?  Then we could justifiably flip the default
>>for the generic *-elf, etc., targets.  In fact in general we could
>>then take the macro out of the tm.h files and into config.gcc, which
>>is probably a more reliable place to put it anyhow.
>>
>
>I think that the decision should be made at configure time, by checking
>the #include headers to see if they are C++-ready.  Look for the string
>"__cplusplus" in some set of standard headers, if it is not found,
>assume that we'll need implicit extern C.  For cross-builds, we still
>have a path to the headers to be checked.
>
Autoconfigury would be hard to make reliable in Darwin, where the
problem headers are (mostly) a number of levels down and in obscure
places under /usr/include. The --with option would work better.

Stan



More information about the Gcc mailing list