public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
From: "egallager at gcc dot gnu.org" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug c/103502] -Wstrict-aliasing=3 doesn't warn on what is documented as UB
Date: Wed, 01 Dec 2021 00:28:34 +0000 [thread overview]
Message-ID: <bug-103502-4-J5kiysdXT8@http.gcc.gnu.org/bugzilla/> (raw)
In-Reply-To: <bug-103502-4@http.gcc.gnu.org/bugzilla/>
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=103502
Eric Gallager <egallager at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |egallager at gcc dot gnu.org
--- Comment #6 from Eric Gallager <egallager at gcc dot gnu.org> ---
(In reply to Andrew Pinski from comment #1)
> The documentation
> (https://gcc.gnu.org/onlinedocs/gcc/Warning-Options.html#Warning-Options)
> for the warning is clear here:
> "Takes care of the common pun+dereference pattern in the front end:
> *(int*)&some_float. "
>
> >3 is documented as the most precise option
>
> I think you misunderstood what precise means in this context really.
> "Higher levels correspond to higher accuracy (fewer false positives). "
-Wstrict-aliasing is kind of confusing in this regards since it's different
from how other warnings with numerical levels work. Normally a higher numerical
value to a warning option means "print more warnings" but for -Wstrict-aliasing
it means "try harder to reduce the number of warnings". Perhaps this is an
inconsistency that should be rectified?
next prev parent reply other threads:[~2021-12-01 0:28 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-11-30 17:22 [Bug c/103502] New: " stsp at users dot sourceforge.net
2021-11-30 21:20 ` [Bug c/103502] " pinskia at gcc dot gnu.org
2021-11-30 21:30 ` stsp at users dot sourceforge.net
2021-11-30 21:34 ` pinskia at gcc dot gnu.org
2021-11-30 21:41 ` stsp at users dot sourceforge.net
2021-11-30 22:07 ` stsp at users dot sourceforge.net
2021-12-01 0:28 ` egallager at gcc dot gnu.org [this message]
2021-12-01 1:26 ` stsp at users dot sourceforge.net
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=bug-103502-4-J5kiysdXT8@http.gcc.gnu.org/bugzilla/ \
--to=gcc-bugzilla@gcc.gnu.org \
--cc=gcc-bugs@gcc.gnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).