Ian Lance Taylor wrote:
Joe Buck <[EMAIL PROTECTED]> writes:
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.
It would be hard to make that completely reliable for embedded systems
development, where the header files may or not be available in any
standard place at the time that gcc is configured.
E.g. the AVR target, which normally uses avr-libc:
<http://savannah.nongnu.org/projects/avr-libc/>
but only builds avr-libc after gcc is built.
Eric