Re: Dealing with warnings & pragma GCC diagnostic in LTO-enabled builds

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



I wonder why the diagnostics are not simply disabled during LTO. Do
you mean that if you don't use the pragmas you get the warnings twice?

Cheers,

Manuel.

On 21 May 2014 15:53, Emmanuel Blot <eblot.ml@xxxxxxxxx> wrote:
> Hi,
>
> I'm having troubles with specifying warnings with LTO-enabled builds:
> Some warnings (-Wstrict-overflow, -Wmaybe-uninitialized, ...) are
> specified on the command line using the -W option switch for compiling
> all files within a project. However on some specific code location,
> I'd like to disable them.
>
> Without LTO mode, "#pragma GCC diagnostic ignored" (along with #pragma
> push & pop) works smoothly.
> However, those pragma declarations seem to be ignored when the
> compiler is invoked back at link stage (LTO build), as if the #pragma
> information was not stored along with the GIMPLE IR.
>
> Is there a workaround, or a better way to disable specific warning in
> specific code locations?
>
> If it matters, I'm using GCC 4.9 with arm-eabi targets, and binutils 2.24
>
> I read the GCC documentation and googled it, but I've not been able to
> find info on this very topic - I may have missed it :-)
>
> Thanks,
> Manu




[Index of Archives]     [Linux C Programming]     [Linux Kernel]     [eCos]     [Fedora Development]     [Fedora Announce]     [Autoconf]     [The DWARVES Debugging Tools]     [Yosemite Campsites]     [Yosemite News]     [Linux GCC]

  Powered by Linux