public inbox for gcc-prs@sourceware.org help / color / mirror / Atom feed
From: rearnsha@gcc.gnu.org To: algrant@acm.org, gcc-bugs@gcc.gnu.org, gcc-prs@gcc.gnu.org, nobody@gcc.gnu.org Subject: Re: c/7284: incorrectly simplifies leftshift followed by signed power-of-2 division Date: Thu, 13 Feb 2003 16:06:00 -0000 [thread overview] Message-ID: <20030213160623.16022.qmail@sources.redhat.com> (raw) Synopsis: incorrectly simplifies leftshift followed by signed power-of-2 division State-Changed-From-To: closed->open State-Changed-By: rearnsha State-Changed-When: Thu Feb 13 16:06:23 2003 State-Changed-Why: I'm re-opening this report. In c89 the text for << says The result of E1 << E2 is E1 left-shifted E2 bit positions; vacated bits are filled with zeros. It then goes on to qualify what this means when E1 is unsigned, but says nothing about the *interpretation* for the signed context (beyond what is specified above). However, in a 2s complement environment it is possible to give a meaningful interpretation of the resulting value. DR#081 says that the meaning in the signed context is "implementation defined", but that is clearly very different from "undefined" as we have at present. At the very least we must document what left shift of a signed value means on our implementation. http://gcc.gnu.org/cgi-bin/gnatsweb.pl?cmd=view%20audit-trail&database=gcc&pr=7284
next reply other threads:[~2003-02-13 16:06 UTC|newest] Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top 2003-02-13 16:06 rearnsha [this message] -- strict thread matches above, loose matches on Subject: below -- 2002-07-12 12:56 Nathan Sidwell 2002-07-12 10:06 Falk Hueffner 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=20030213160623.16022.qmail@sources.redhat.com \ --to=rearnsha@gcc.gnu.org \ --cc=algrant@acm.org \ --cc=gcc-bugs@gcc.gnu.org \ --cc=gcc-gnats@gcc.gnu.org \ --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: linkBe 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).