From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 18906 invoked by alias); 12 Jul 2002 16:46:01 -0000 Mailing-List: contact gcc-prs-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Archive: List-Post: List-Help: Sender: gcc-prs-owner@gcc.gnu.org Received: (qmail 18892 invoked by uid 71); 12 Jul 2002 16:46:01 -0000 Date: Fri, 12 Jul 2002 09:46:00 -0000 Message-ID: <20020712164601.18891.qmail@sources.redhat.com> To: nobody@gcc.gnu.org Cc: gcc-prs@gcc.gnu.org, From: Nathan Sidwell Subject: Re: c/7284: incorrectly simplifies leftshift followed by signed power-of-2 division Reply-To: Nathan Sidwell X-SW-Source: 2002-07/txt/msg00381.txt.bz2 List-Id: The following reply was made to PR c/7284; it has been noted by GNATS. From: Nathan Sidwell To: Al Grant Cc: falk.hueffner@student.uni-tuebingen.de, nathan@gcc.gnu.org, algrant@acm.org, gcc-bugs@gcc.gnu.org, gcc-prs@gcc.gnu.org, nobody@gcc.gnu.org, gcc-gnats@gcc.gnu.org Subject: Re: c/7284: incorrectly simplifies leftshift followed by signed power-of-2 division Date: Fri, 12 Jul 2002 17:37:53 +0100 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