Re: gcc 3.3 / i386 / -O2 question

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

 



Dave Korn wrote:
  Excuse me for butting in, but I don't understand what makes anyone think this
code _ought_ to produce the same results at different -O levels[*].  The C
language spec is explicit that this is undefined behaviour.

As every software that do data-processing you need it will reproduce the same behavior with any not-altering-semantic-option.
Well if you put garbage in you will obtain garbage out, but the problem can raise if the garbage generation is not deterministic.


If the code is syntattical garbage ===> compiler don't compile it
if the code is semantical garbage ===> same compiler must generate the same output (in .s or in .o) ==> you must obtain the same result.


or not?


Luca Benini

[Index of Archives]     [Linux C Programming]     [Linux Kernel]     [eCos]     [Fedora Development]     [Fedora Announce]     [Autoconf]     [The DWARVES Debugging Tools]     [Yosemite Campsites]     [Yosemite News]     [Linux GCC]

  Powered by Linux