[Bug c/7284] incorrectly simplifies leftshift followed by signed power-of-2 division
rearnsha at arm dot com
gcc-bugzilla@gcc.gnu.org
Wed Jul 16 09:52:00 GMT 2003
PLEASE REPLY TO gcc-bugzilla@gcc.gnu.org ONLY, *NOT* gcc-bugs@gcc.gnu.org.
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=7284
------- Additional Comments From rearnsha at arm dot com 2003-07-16 09:52 -------
Subject: Re: incorrectly simplifies leftshift followed by
signed power-of-2 division
> > if the result is *implementation-defined*, it probably
> > shouldn't vary depending on optimization level
>
> "Implementation" includes the specific set of command-line
> options. See C99 3.10.
>
Even if I bought that idea (and I don't particularly in this case):
1) We are talking about C90 specified behaviour
2) An implementation still has to document what the behaviour is for each
option (that's the "defined" bit :-)
What we have at present is -O gives undefined behaviour...
R.
More information about the Gcc-bugs
mailing list