autoconf-patches
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: changing "configure" to default to "gcc -g -O2 -fwrapv ..."


From: Bruce Korb
Subject: Re: changing "configure" to default to "gcc -g -O2 -fwrapv ..."
Date: Fri, 29 Dec 2006 17:36:28 -0800
User-agent: Thunderbird 1.5.0.8 (X11/20060911)

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.




reply via email to

[Prev in Thread] Current Thread [Next in Thread]