------- 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