Re: GCC 12.1, -isystem, -Wsystem-headers, and -Wmaybe-uninitialized

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

 



On Wed, 18 May 2022, 17:57 Tom Kacvinsky via Gcc-help, <gcc-help@xxxxxxxxxxx>
wrote:

> We were happily using -Wall -Wextra -Werror with GCC 8.3.0 and -isystem
> for Boost header files to squelch any warnings that would come out of
> Boost.
>
> I recently switched to GCC 12.1 and now we are getting
> -Wmaybe-uninitialized errors out of Boost.  So I am not sure if
> -Wsystem-headers was not part of -Wall -Wextra in GCC 8.3.0 but is now
> part of GCC 12.1.0.
>

No it isn't, it's just that some warnings are now given even if they occur
in system headers.



> Optimization level plays a role in this.  With -O0 (GCC 12.1), the
> warning does not happen, but with -O3, it does.
>

The uninitialised warnings depend on data flow analysis, which only happens
with optimization.



> So I am not sure of the interaction between optimization, -Wall -Wextra,
> -Wsystem-headers, and GCC 8.3.0 and GCC 12.1.0.
>
> Any ideas?
>
> Thanks, Tom
>



[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