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