This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: RS6000 buried treasure - NO_IMPLICIT_EXTERN_C
- From: Zack Weinberg <zack at codesourcery dot com>
- To: Stan Shebs <shebs at apple dot com>
- Cc: Dale Johannesen <dalej at apple dot com>,Zack Weinberg <zack at codesourcery dot com>,David Edelsohn <dje at watson dot ibm dot com>, gcc-patches at gcc dot gnu dot org
- Date: Fri, 8 Nov 2002 13:48:24 -0800
- Subject: Re: RS6000 buried treasure - NO_IMPLICIT_EXTERN_C
- References: <406F4044-F351-11D6-B269-000393D76DAA@apple.com> <3DCC28E5.9060402@apple.com>
On Fri, Nov 08, 2002 at 01:13:09PM -0800, Stan Shebs wrote:
> >>
> >>Defining or not defining NO_IMPLICIT_EXTERN_C addresses only one C++
> >>issue with system headers. It should be defined by all targets where
> >>the system headers already wrap declarations in extern "C" { ... }
> >>when appropriate, and not defined otherwise. Is it really the case
> >>that no AIX release provides extern "C" markers?
> >
> >
> >Darwin headers seem to provide extern "C", at least in the examples I
> >tried, although I'm not sure I understand what "when appropriate"
> >is exactly. However, darwin.h doesn't currently define
> >NO_IMPLICIT_EXTERN_C,
> >and I'm not aware of any problems with the way things work now
> >(it's possible the same altivec.h problem exists, though), so I'd
> >request that somebody at least try it on Darwin before changing it.
> >
> Alas, many of the Mach headers are unprotected, even in 6.2, although
> I believe that will be fixed in a future release. So if it got defined in
> rs6000.h, we'd have to undef in darwin.h.
Okay, with you expressing concerns about Darwin and David expressing
concerns about AIX, it sounds like it's best to move the #define to
rs6000/sysv4.h instead. That restricts the effect to the Hurd, Linux,
FreeBSD, NetBSD, plain SYSV, Chorus, eabi*, RTEMS, and VxWorks ports.
zw