This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c/23106] -Wstrict-aliasing=2 doesn't warn for all aliasing problems
- From: "wilson at gcc dot gnu dot org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 28 Jul 2005 23:19:02 -0000
- Subject: [Bug c/23106] -Wstrict-aliasing=2 doesn't warn for all aliasing problems
- References: <20050727233319.23106.fn_x@hotmail.com>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
------- Additional Comments From wilson at gcc dot gnu dot org 2005-07-28 23:18 -------
-Wstrict-aliasing warns for all aliasing problems that we can detect, and which
are obviously incorrect.
-Wstrict-aliasing=2 warns for all aliasing problems that we can detect, and
which are not obviously correct. Thus -Wstrict-aliasing=2 catches more problems
than -Wstrict-aliasing, i.e. the ambiguous ones, but will also sometimes warn
for cases that are technically OK.
-Wstrict-aliasing=2 will report all aliasing prolems that we can detect, but
obviously, neither one can warn about aliasing problems that we can't detect,
and hence neither one can catch all possible cases. So I see that the "all" in
the docs is misleading. I will rewrite.
--
What |Removed |Added
----------------------------------------------------------------------------
AssignedTo|unassigned at gcc dot gnu |wilson at gcc dot gnu dot
|dot org |org
Status|NEW |ASSIGNED
Last reconfirmed|2005-07-28 16:40:42 |2005-07-28 23:18:58
date| |
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=23106