------- Comment #9 from dcb314 at hotmail dot com  2006-12-19 16:37 -------
(In reply to comment #8)
> And they expect a lot from our optimizers.

Surely not at the -O2 level ?

I thought folks serious about optimisation used -O3
and / or a bunch of other flags like -fsomething ?

> The problem is that this "old behavior" is simply "luck".  You are simply
> *lucky* the optimizer wasn't smart enough to remove the check in all cases.
> 
> Now it is.

Continued pleadings that the code is broken as far as the standard
is concerned and should be fixed aren't really helping, I'm afraid.

I've got the message.

The only way I've got at the moment of finding my broken code is 
by observing its run time behaviour, which is expensive.

How about making this a cheaper search by either

a) generating a compile time warning whenever this optimisation
is applied ? That way I can find & fix the problem in my code
at compile time, not run time.

b) Please identify to me which piece of source code of the compiler is making
this optimisation and I'll either remove the optimisation or put in a warning
msg in my copy of the compiler.

> We have and will continue to optimize based on what the standard says we can
> do, and provide users flags to do otherwise.

Adhering to the standard is all well and good, but the compiler also
has to compile real world code in a reasonable fashion too.

> You want to do otherwise, so please use the flags.

It is very helpful that the flags are provided for those 
who want the old behaviour.


-- 

dcb314 at hotmail dot com changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|RESOLVED                    |UNCONFIRMED
         Resolution|INVALID                     |


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=30245

Reply via email to