Paul Eggert wrote: > I don't feel a strong need for 'configure' to default to > -fstrict-aliasing with GCC. Application code that violates > strict aliasing assumptions is often unportable in practice > for other reasons, and needs to be rewritten anyway, even if > optimization is disabled. So -fstrict-aliasing wouldn't > help that much.
Having been out of academia and in the corporate world for a few decades, let me assure you that there is lots of application code that violates strict aliasing assumptions and is perfectly fine. In fact, industrial users seem to be starting to switch to ``-O0'' just to avoid such issues because optimizing at all with GCC isn't worth the risk. All your efforts to optimize are pointless for them. Personally, I prefer to optimize and use -fno-strict-aliasing. I do not wish to have to worry over making aliasable pointers members of unionized pointers. Whatever the optimizing gain is, it ain't worth the pain. > In contrast, the wrapv assumption is relatively safe > All that being said, I have no real objection to having > Autoconf default to -fstrict-aliasing too. However, I'd > rather not propose that change right now; one battle at a time. Good plan.