public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
From: "stsp at users dot sourceforge.net" <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 01:26:37 +0000	[thread overview]
Message-ID: <bug-103502-4-4CZ0LT4kZ1@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

--- Comment #7 from Stas Sergeev <stsp at users dot sourceforge.net> ---
(In reply to Eric Gallager from comment #6)
> -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".

Number of warnings, or number
of false-positives?
This is what is still unclear
to me. If it reduces the number
of warnings (including valid ones,
by not applying some checks for
example), then indeed what you propose
can be done (or not done - it would
be rather straight-forward anyway).

But I had the following assumptions:
1. It reduces the number of only false-positives
2. It increases the amount of warnings by avoiding false-negatives
(i.e. by not "hiding" the warnings that lower
levels could miss)
3. The warning I've seen on lower levels was a valid one

I suppose what you propose, can
be done if 2 is not true.
I still don't know which of the
above wasn't true.

      parent reply	other threads:[~2021-12-01  1:26 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
2021-12-01  1:26 ` stsp at users dot sourceforge.net [this message]

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-4CZ0LT4kZ1@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).