This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c/40216] Optimization error when compiling bfd/ecofflink.c on x86_64
- From: "dahowell at directv dot com" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 21 May 2009 21:17:19 -0000
- Subject: [Bug c/40216] Optimization error when compiling bfd/ecofflink.c on x86_64
- References: <bug-40216-10870@http.gcc.gnu.org/bugzilla/>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
------- Comment #3 from dahowell at directv dot com 2009-05-21 21:17 -------
(In reply to comment #2)
So this is a false negative for -Wstrict-aliasing=3. It is flagged by
-Wstrict-aliasing=2, however. Is -Wstrict-aliasing=3 not catching it because
the pointer is not being dereferenced, except in the called function?
Perhaps passing a pointer to a function should be treated as a dereference for
the purpose of generating a warning? This seems like something that could cause
a lot of legacy code to fail in unexpected ways as the optimizer gets better.
Should I submit a separate bug for this code failing to generate a warning with
-Wall?
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=40216