[Bug c/22278] gcc -O2 discards cast to volatile
schlie at comcast dot net
gcc-bugzilla@gcc.gnu.org
Sun Jul 3 07:54:00 GMT 2005
------- Additional Comments From schlie at comcast dot net 2005-07-03 07:54 -------
(In reply to comment #39)
> Subject: Re: gcc -O2 discards cast to volatile
So unfortunately, again the question which comes to mind is what
should happen when a program specifies an undefined behavior?
Personally it seems most generally useful to warn that the behavior
is undefined, but treat the objects as specified, as would be expected.
(as the alternative would neither be expected nor well defined)
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=22278
More information about the Gcc-bugs
mailing list