[PATCH] C undefined behavior fix

dewar@gnat.com dewar@gnat.com
Wed Jan 9 20:33:00 GMT 2002


Peter said

<<Then the code can be optimized to 'b = 0;' since nowhere in the scope
of 'a' does anyone take its address(which would allow it to be changed).
Of course if 'a' is external then another function can access its
address.
>>

Well if nothing else this shows that there is still significant disagreement.
I consider Peter's statement to be 100% wrong here, optimizing away the
access to b would be a clear violation of the standard. I thought that
the argument had been made in a clear and convincing manner, but apparently
some people completely refuse to be convinced!



More information about the Gcc mailing list