> This is an updated version of Laurent's patch originally here: > http://gcc.gnu.org/ml/gcc/2009-06/msg00635.html Revised version, only 33 files modified now (instead of 51). We compile the C files for the compiler proper (and gnatbind) with the C++ compiler, but we keep compiling them with the C compiler in the other cases (library & tools). I think that this is in keeping with the other compilers (e.g. libgcc is still compiled with the C compiler). Bootstrapped/regtested on x86_64-suse-linux with --enable-build-with-cxx. Arno, do you have any objections to me applying this? 2011-07-12 Laurent GUERBY Eric Botcazou gcc/ * prefix.h: Wrap up in extern "C" block. ada/ * adadecode.c: Wrap up in extern "C" block. * adadecode.h: Likewise. * adaint.c: Likewise. Remove 'const' keyword. * adaint.h: Likewise. * argv.c: Likewise. * atree.h: Likewise. * cio.c: Likewise. * cstreams.c: Likewise. * env.c: Likewise. * exit.c: Likewise. * fe.h: Likewise. * final.c: Likewise. * init.c: Likewise. * initialize.c: Likewise. * link.c: Likewise. * namet.h: Likewise. * nlists.h: Likewise. * raise.c: Likewise. * raise.h: Likewise. * repinfo.h: Likewise. * seh_init.c: Likewise. * targext.c: Likewise. * tracebak.c: Likewise. * uintp.h: Likewise. * urealp.h: Likewise. * xeinfo.adb: Wrap up generated C code in extern "C" block. * xsinfo.adb: Likewise. * xsnamest.adb: Likewise. * gcc-interface/gadaint.h: Wrap up in extern "C" block. * gcc-interface/gigi.h: Wrap up some prototypes in extern "C" block. * gcc-interface/misc.c: Likewise. * gcc-interface/Make-lang.in (GCC_LINK): Use LINKER. (GNAT1_C_OBJS): Remove ada/b_gnat1.o. List ada/seh_init.o and ada/targext.o here... (GNAT_ADA_OBJS): ...and not here. (GNAT1_ADA_OBJS): Add ada/b_gnat1.o. (GNATBIND_OBJS): Reorder. -- Eric Botcazou