This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c/80130] Wrong diagnostic: dereferencing type-punned pointer
- From: "egallager at gcc dot gnu.org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Mon, 31 Jul 2017 19:48:05 +0000
- Subject: [Bug c/80130] Wrong diagnostic: dereferencing type-punned pointer
- Auto-submitted: auto-generated
- References: <bug-80130-4@http.gcc.gnu.org/bugzilla/>
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=80130
Eric Gallager <egallager at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |egallager at gcc dot gnu.org
--- Comment #2 from Eric Gallager <egallager at gcc dot gnu.org> ---
I only get 1 warning on (1) and only with -Wstrict-aliasing=1.
-Wstrict-aliasing=2 and -Wstrict-aliasing=3 are both silent.
(In reply to Richard Biener from comment #1)
> The warning implementation is incredibly stupid, don't use it. It doesn't
> have any context (so the two stmt variant is different from the single stmt
> one).
It'd still be nice if it could be improved though. Although, maybe it already
has been?