------- Comment #12 from sergstesh at yahoo dot com  2008-01-18 03:20 -------
Regarding

"
About the dependency on optimization level, signed integer overflow is
undefined in C standard so its not a good idea to depend on it. What GCC does
is exploiting this fact for optimizations which is fine.
"

- I do not think this is fine. As end user I want to see my errors the same
way at any optimization level.

My expectations are that regardless of optimization level I'll get my program
functioning the same way, but with different memory consumption/speed.

I am not talking about out of bounds indices and possible reshuffling of
variables in memory, I'm talking about arithmetic/logic expressions, i.e.

printf("some_var=%g\n", some_var);

should always print the same.


-- 


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

Reply via email to