This is the mail archive of the gcc-help@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: g++-arm-none-eabi system includes and implicit extern "C"


On 1 February 2016 at 21:59, Josh Bialkowski wrote:
> With regard to compiling with warnings as errors (-Werror), I've been
> disabling warnings from some header files by including them through
> "-isystem". However, with g++-arm-none-eabi-4.9 (downloaded from
> https://launchpad.net/gcc-arm-embedded/+download) it seems that files
> included from paths listed as "-isystem" are implicitly considered
> 'extern "C"'. This is causing some issues with (for instance) "error:
> template with C linkage". I learned of this through a mailing list
> thread:
>
> https://gcc.gnu.org/ml/gcc-patches/2012-06/msg01159.html

Ugh. IMHO it's a bug if arm-none-eabi uses implicit extern "C". No
modern systems should have that set.


> If I include these directories with -I, and I exclude "-Werror" (so
> that warnings are not treated as errors) then I can compile. I'm
> wondering if there are any options that would allow me to continue
> treating warnings as errors, except for (third_party) headers that are
> out of my control, without implicitly treating those headers with
> 'extern "C"'?

I don't think so. The implicit extern "C" thing is fixed when GCC
itself is compiled and it can't be turned on or off by an option.


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