Hello, For targets that do not define NO_IMPLICIT_EXTERN_C, GCC assumes that included system headers are implicitly wrapped in 'extern "C" {...}'. I could not find where this target macro was introduced, but it is very old (it is already mentioned in FSFChangeLog.10 for a change in 1995). AFAICT, today all supported targets have C++-compatible headers (according to one comment, even hpux8 had C++-compatible system headers :-), so NO_IMPLICIT_EXTERN_C shouldn't be necessary anymore.
The only target that explicitly undefines NO_IMPLICIT_EXTERN_C is sparc64-openbsd, and I find it hard to believe that the system headers on openbsd are not also already C++-compatible. Marc, could you have a look at this, please? The attached patch removes NO_IMPLICIT_EXTERN_C, and replaces its sole user with IMPLICIT_EXTERN_C to avoid the double negations (#ifndef NO_IMPLICIT_EXTERN_C, etc.). Bootstrapped and tested on x86_64-unknown-linux-gnu. OK for trunk? Ciao! Steven
fixup_NO_IMPLICIT_EXTERN_C.diff
Description: Binary data