[Top][All Lists]

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

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

From: Andrew Pinski
Subject: Re: changing "configure" to default to "gcc -g -O2 -fwrapv ..."
Date: Sat, 30 Dec 2006 03:01:16 -0500 (EST)

> "Daniel Berlin" <address@hidden> writes:
> > Just to address the other compiler issue
> >>
> >> No, they will work on other compilers, since 'configure'
> >> won't use -O2 with those other compilers.
> >
> > icc defaults to -O2 without any options, so unless you are passing
> > -O0, it will enable this.
> Thanks, I didn't know that (I don't use icc).
> If -O0 is the only way to convince icc to give us wraparound
> arithmetic, then I guess we'll have to default to -O0 for icc.

What about XYZCC?  I don't see why defaulting to -O0 for ICC will
help here at all.  You are just giving up on the undefined issue instead of
fixing it in the source.  I gave a way how to do this loop in a portable way
and I have not got comments back from you saying it is a good idea or not.
Since there the way you define the loop right now is not portable at all given
Daniel's comments about both ICC and XLC, I don't see why you are trying to hide
the issue.

I don't see why we are getting away from the real issue of autoconf depending on
undefined behavior code that might be miscompiled with any compiler, might not 
GCC but could any?

Here at Sony, we get reports about aliasing issues and we actually help the 
fix their code so it is portable and works correctly.  In fact recently I have 
been asked
about aliasing issues in code even if GCC did not create the "wrong" code yet.  
The developer
was able to fix his code before he even started to compile the code.

Andrew Pinski

reply via email to

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