This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug c/40216] Optimization error when compiling bfd/ecofflink.c on x86_64



------- 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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]