gcc 2.96 optimization bug on RedHat7.0/alpha
Wed Apr 18 08:18:00 GMT 2001
I'm sorry that u believe this but i believe that the results from
-O0 == -O1 == -O2 == -O3 == -O4
should all be the same. If any one of them failes to be equal, then the compiler
failed to produce the correct code to derive the correct results. It is
particularly onerous if the failure is not reported in any fashion.
It is never perfectly OK to produce bad code. AND i dont care what standard one
uses to justify this 'OK'ness.
BTW your opinion about the code posted is broken, is also ur opinion. It is
perfectly correct IMHO . I guess it just does not live up to some one else's
BTW#2 all that stuff about meaning & intention just doesnt work for me. It just
appears to be another form of vague subtrafuge.
David Woodhouse wrote:
> firstname.lastname@example.org said:
> > Any compiler that does not produce the correct code has a bug - baring
> > any error messages.
> How do you define 'correct'?
> The compiler produced 'correct' code according to the ISO C standard. It
> has no way of knowing what's 'correct' if you define that as meaning the
> _intention_ of the programmer, even when they write incorrect source code.
> The code posted was broken - or at least the assumption about the results
> was incorrect. The compiler's behaviour was perfectly OK.
> If you have code to enable a 'Do what I meant, not what I wrote' feature in
> gcc, I'm sure we'd all be glad to see it - I know I've needed it before now :)
> Gcc does have some warnings of the 'You wrote this; are you sure you didn't
> mean something else' variety. Perhaps adding a warning for this situation
> would be possible - perhaps not. But that wouldn't be a bug report, that
> would be a feature request. And I believe gcc-3.0 is in feature-freeze
> Axp-list mailing list
More information about the Gcc-bugs