* GCC 12.1, -isystem, -Wsystem-headers, and -Wmaybe-uninitialized
@ 2022-05-18 16:56 Tom Kacvinsky
2022-05-18 18:32 ` Jonathan Wakely
0 siblings, 1 reply; 2+ messages in thread
From: Tom Kacvinsky @ 2022-05-18 16:56 UTC (permalink / raw)
To: gcc-help
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.
Optimization level plays a role in this. With -O0 (GCC 12.1), the
warning does not happen, but with -O3, it does.
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
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: GCC 12.1, -isystem, -Wsystem-headers, and -Wmaybe-uninitialized
2022-05-18 16:56 GCC 12.1, -isystem, -Wsystem-headers, and -Wmaybe-uninitialized Tom Kacvinsky
@ 2022-05-18 18:32 ` Jonathan Wakely
0 siblings, 0 replies; 2+ messages in thread
From: Jonathan Wakely @ 2022-05-18 18:32 UTC (permalink / raw)
To: Tom Kacvinsky; +Cc: gcc-help
On Wed, 18 May 2022, 17:57 Tom Kacvinsky via Gcc-help, <gcc-help@gcc.gnu.org>
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
>
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2022-05-18 18:32 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-05-18 16:56 GCC 12.1, -isystem, -Wsystem-headers, and -Wmaybe-uninitialized Tom Kacvinsky
2022-05-18 18:32 ` Jonathan Wakely
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).