This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: RS6000 buried treasure - NO_IMPLICIT_EXTERN_C


Dale Johannesen wrote:

On Friday, November 8, 2002, at 11:20  AM, Zack Weinberg wrote:

On Fri, Nov 08, 2002 at 10:56:24AM -0500, David Edelsohn wrote:

I am inclined to enable NO_IMPLICIT_EXTERN_C for the entire directory,
in rs6000.h.  What few targets this is inappropriate for -- I'm
willing to bet that's either none, or only AIX 3.1 -- can #undef it
again.

Comments?

I could see placing this in sysv4.h, but not rs6000.h. I do not
believe that GCC's fixincludes completely addresses the C++ issues in the
AIX header files. IBM Visual Age C++ distributes its own system header
files.

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.

Stan



Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]