[Bug preprocessor/85211] -isystem automatically adds extern "C" to includes

2018-04-09 Thread redi at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=85211

Jonathan Wakely  changed:

   What|Removed |Added

   Keywords||documentation
 Status|UNCONFIRMED |NEW
   Last reconfirmed||2018-04-09
 Ever confirmed|0   |1

--- Comment #8 from Jonathan Wakely  ---
(In reply to blastrock from comment #7)
> My initial suggestion was to mention that behavior in the documentation, but
> if you think it is not worth it, I guess you can close this bug.

I'm not sure why it's no longer mentioned, so I'll confirm this as a doc bug.

[Bug preprocessor/85211] -isystem automatically adds extern "C" to includes

2018-04-09 Thread blastrock at free dot fr
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=85211

--- Comment #7 from blastrock at free dot fr ---
You are right, my bad.

I managed to build it by adding the definition in gcc/config/arm/arm.h .

My initial suggestion was to mention that behavior in the documentation, but if
you think it is not worth it, I guess you can close this bug.

Thanks anyway for your help!

[Bug preprocessor/85211] -isystem automatically adds extern "C" to includes

2018-04-05 Thread redi at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=85211

--- Comment #6 from Jonathan Wakely  ---
(In reply to blastrock from comment #5)
> So is this a regression since #37727 was fixed?

PR 37727 is not fixed, it's still NEW.

[Bug preprocessor/85211] -isystem automatically adds extern "C" to includes

2018-04-05 Thread blastrock at free dot fr
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=85211

--- Comment #5 from blastrock at free dot fr ---
I tried using their recipe to rebuild gcc. The configure line is the following:

$ /media/usb1/vitasdkbuild/build/gcc-final-prefix/src/gcc-final/configure
--build=x86_64-linux-gnu --host=x86_64-linux-gnu --target=arm-vita-eabi
--prefix=/media/usb1/vitasdkbuild/build/vitasdk
--libdir=/media/usb1/vitasdkbuild/build/vitasdk/lib
--libexecdir=/media/usb1/vitasdkbuild/build/vitasdk/lib
--with-sysroot=/media/usb1/vitasdkbuild/build/vitasdk/arm-vita-eabi
--with-gmp=/media/usb1/vitasdkbuild/build/deps_build
--with-mpfr=/media/usb1/vitasdkbuild/build/deps_build
--with-mpc=/media/usb1/vitasdkbuild/build/deps_build
--with-isl=/media/usb1/vitasdkbuild/build/deps_build
--with-libelf=/media/usb1/vitasdkbuild/build/deps_build
--with-python-dir=share/gcc-arm-vita-eabi --enable-languages=c,c++
--disable-decimal-float --disable-libffi --disable-libgomp --disable-libmudflap
--disable-libquadmath --disable-libssp --disable-libstdcxx-pch --disable-nls
--disable-shared --disable-tls --with-gnu-as --with-gnu-ld --with-newlib
--disable-multilib --with-arch=armv7-a --with-tune=cortex-a9 --with-fpu=neon
--with-float=hard --with-mode=thumb --with-pkgversion=GNU Tools for ARM
Embedded Processors --with-host-libstdcxx=-static-libgcc
-Wl,-Bstatic,-lstdc++,-Bdynamic -lm --with-headers=yes --enable-threads=posix

You can see --with-newlib in there. However I can confirm that
NO_IMPLICIT_EXTERN_C is not defined as I tried inserting broken code in the
#ifndef NO_IMPLICIT_EXTERN_C in parser.c and it did break compilation.

So is this a regression since #37727 was fixed?

[Bug preprocessor/85211] -isystem automatically adds extern "C" to includes

2018-04-05 Thread redi at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=85211

--- Comment #4 from Jonathan Wakely  ---
(In reply to blastrock from comment #2)
> And I was hoping for a way to disable it at runtime, recompiling
> gcc seems quite complex...

That's not possible.

[Bug preprocessor/85211] -isystem automatically adds extern "C" to includes

2018-04-05 Thread pinskia at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=85211

--- Comment #3 from Andrew Pinski  ---
(In reply to blastrock from comment #2)
> I think it would be nice to mention it in the documentation as it was in
> version 6. And I was hoping for a way to disable it at runtime, recompiling
> gcc seems quite complex...

That seems like their target arm-vita-eabi should have it disabled anyways. 
For all newlib targets, NO_IMPLICIT_EXTERN_C should be defined.

See https://gcc.gnu.org/bugzilla/show_bug.cgi?id=37727 also.

And https://gcc.gnu.org/bugzilla/show_bug.cgi?id=57699 .

[Bug preprocessor/85211] -isystem automatically adds extern "C" to includes

2018-04-05 Thread blastrock at free dot fr
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=85211

--- Comment #2 from blastrock at free dot fr ---
I think it would be nice to mention it in the documentation as it was in
version 6. And I was hoping for a way to disable it at runtime, recompiling gcc
seems quite complex...

[Bug preprocessor/85211] -isystem automatically adds extern "C" to includes

2018-04-04 Thread redi at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=85211

--- Comment #1 from Jonathan Wakely  ---
This behaviour is target-dependent. If the target defines NO_IMPLICIT_EXTERN_C
then it doesn't happen.