Subject: re: System includes C++ safe?
To: James Chacon <jmc@netbsd.org>
From: matthew green <mrg@eterna.com.au>
List: tech-toolchain
Date: 12/26/2003 16:17:18
   See PR#20421, share/mk/bsd.prog.mk rev 1.175 and GCC bug 7327 for some
   additional background.
   
   Basically doing this:
   
   cat > /tmp/test.cpp <<EOF
   #include <map>
   EOF
   g++ -c -nostdinc++ -isystem /usr/include/g++ /tmp/test.cpp
   
   Will blow up with lots of errors about templates inside of traditional C
   code. 
   
   Turns out this is due to NetBSD hosts not defining NO_IMPLICIT_EXTERN_C
   in the gcc config. 
   
   Since we don't use fixincludes and otherwise assume our headers are fine, is
   there any reason not to define this? i.e. everything is wrapped in 
   BEGIN_DECLS (or should be) which DTRT for c++ vs non-c++ code.


use -isystem-cxx.


.mrg.