This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
Re: c/7284: incorrectly simplifies leftshift followed by signed power-of-2 division
- From: Nathan Sidwell <nathan at acm dot org>
- To: Al Grant <AlGrant at myrealbox dot com>
- Cc: falk dot hueffner at student dot uni-tuebingen dot de, nathan at gcc dot gnu dot org, algrant at acm dot org, gcc-bugs at gcc dot gnu dot org, gcc-prs at gcc dot gnu dot org, nobody at gcc dot gnu dot org, gcc-gnats at gcc dot gnu dot org
- Date: Fri, 12 Jul 2002 17:37:53 +0100
- Subject: Re: c/7284: incorrectly simplifies leftshift followed by signed power-of-2 division
- References: <1026490184.6889fff8AlGrant@myrealbox.com>
- Reply-to: nathan at compsci dot bristol dot ac dot uk
Al Grant wrote:
> I read the C89 standard (and the C++ standard).
you need to read more carefully.
KnR 2 A7.8 says the same as C99,
C++ says [5]/5 that if the result is not in the range of representable values,
the behaviour is undefined.
nathan
--
Dr Nathan Sidwell :: Computer Science Department :: Bristol University
The voices in my head told me to say this
nathan@acm.org http://www.cs.bris.ac.uk/~nathan/ nathan@cs.bris.ac.uk