This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: Targets using implicit extern "C"
- From: Ralf Corsepius <ralf dot corsepius at rtems dot org>
- To: "Joseph S. Myers" <joseph at codesourcery dot com>
- Cc: GCC List <gcc at gcc dot gnu dot org>
- Date: Mon, 09 May 2005 05:55:19 +0200
- Subject: Re: Targets using implicit extern "C"
- References: <Pine.LNX.4.61.0505082333230.7267@digraph.polyomino.org.uk>
On Sun, 2005-05-08 at 23:34 +0000, Joseph S. Myers wrote:
> The following targets (based on wildcarded entries from config.gcc) do
> *not* appear to define NO_IMPLICIT_EXTERN_C, i.e. GCC is configured to
> suppose their headers are not C++-aware and to add an implicit extern
> "C" around them. Are there any in this list which should not be,
> i.e. which should be presumed to have C++-aware headers? Conversely,
> are there any in this list whose maintainers can confirm that the
> headers are not C++-aware and so the current configuration is correct?
> Many are generic embedded targets with no fixed set of system headers,
> but in such cases is the implicit extern "C" really the right default?
> Note: if you belive your target should define NO_IMPLICIT_EXTERN_C but
> doesn't, then I suggest preparing and testing the appropriate patch to
> define it; I'd rather that no such changes are mixed up with inverting the
> sense of the target macro used.
FWIW: IMO, NO_IMPLICIT_EXTERN_C actually is an OS/libc feature ("Your
system headers are c++ aware"), therefore it is hardly possible or
useful to ever use "#define NO_IMPLICIT_EXTERN_C" on "generic" targets
(*-elf, *-coff etc.).
Ralf