This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug c/7284] incorrectly simplifies leftshift followed by signed power-of-2 division


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.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]