This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c/42830] Inlining changes semantics when strict aliasing optimization is enabled
- From: "gary at intrepid dot com" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 21 Jan 2010 20:54:48 -0000
- Subject: [Bug c/42830] Inlining changes semantics when strict aliasing optimization is enabled
- References: <bug-42830-9975@http.gcc.gnu.org/bugzilla/>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
------- Comment #4 from gary at intrepid dot com 2010-01-21 20:54 -------
(In reply to comment #3)
> This is by design since the code is undefined.
Just to be clear, what aspect of the test case is undefined?
In any event, my suggestion is only that the warning be enabled in the case
that inlining leads to a situation where the optimizer can detect that the
expanded code violates the strict-aliasing requirements.
Alternatively, GCC might silently disable that particular optimization if the
aliasing issue is a result of inlining, because that can be a rather surprising
result, which is not easy for a user to diagnose based upon a
procedure-by-procedure analysis.
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=42830