This is the mail archive of the libc-alpha@sources.redhat.com mailing list for the glibc 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]

Re: mktime.c fixes (part 4 of 6): verify assumptions at compile-time


On Wed, 31 Dec 2003, Paul Eggert wrote:

> If you are modifying GCC to do GCC-2.2.2-style optimization again,
> please disable the optimization by default.  It's quite OK to have it

Having these optimizations again is hardly new.  For example, GCC 3.0.4 
optimizes out the multiplication and division in

int f (int a) { return (2 * a) / 2; }

(so do 2.7.2.3 through 2.95.3, but in those cases it's simply a broken
optimization as they do it for unsigned as well).  I suspect there have
been other instances for longer (and -fwrapv may not yet work perfectly,
as such assumptions about undefined behavior have had a long time to get
into various parts of the compiler).

-- 
Joseph S. Myers
jsm@polyomino.org.uk


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