public inbox for gcc-prs@sourceware.org
help / color / mirror / Atom feed
From: Falk Hueffner <falk.hueffner@student.uni-tuebingen.de>
To: nobody@gcc.gnu.org
Cc: gcc-prs@gcc.gnu.org,
Subject: Re: c/7284: incorrectly simplifies leftshift followed by signed power-of-2 division
Date: Fri, 12 Jul 2002 10:06:00 -0000	[thread overview]
Message-ID: <20020712170601.6218.qmail@sources.redhat.com> (raw)

The following reply was made to PR c/7284; it has been noted by GNATS.

From: Falk Hueffner <falk.hueffner@student.uni-tuebingen.de>
To: "Al Grant" <AlGrant@myrealbox.com>
Cc: 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: 12 Jul 2002 19:01:43 +0200

 "Al Grant" <AlGrant@myrealbox.com> writes:
 
 > 3.3.7 (something else in ISO, maybe 6.3.7)
 > 
 >   The result of E1 << E2 is E1 left-shifted E2 bit
 >   positions; vacated bits are filled with zeros.
 > 
 > For signed types it says nothing more.
 > 
 > Now if signed left-shift is defined at all, in terms of the
 > representation, I don't see there's any lack of definition in
 > "0x00000080 left-shifted 24 bit positions", it is clearly 0x80000000
 > (of the same type).  So it's defined unless the standard says
 > otherwise, which only C99 seems to.
 
 Defect Report #081 seems to be of interest here
 (http://wwwold.dkuug.dk/JTC1/SC22/WG14/www/docs/dr_081.html). It
 basically states that the behaviour is implementation defined (for any
 signed left shift, not just this case).
 
 -- 
 	Falk


             reply	other threads:[~2002-07-12 17:06 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2002-07-12 10:06 Falk Hueffner [this message]
  -- strict thread matches above, loose matches on Subject: below --
2003-02-13 16:06 rearnsha
2002-07-12 12:56 Nathan Sidwell
2002-07-12  9:46 Nathan Sidwell
2002-07-12  9:26 Falk Hueffner
2002-07-12  8:16 Falk Hueffner
2002-07-12  8:06 Al Grant
2002-07-12  7:12 nathan
2002-07-12  4:26 algrant

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20020712170601.6218.qmail@sources.redhat.com \
    --to=falk.hueffner@student.uni-tuebingen.de \
    --cc=gcc-prs@gcc.gnu.org \
    --cc=nobody@gcc.gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).