🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.std.c
Article #3014

Re: Is INT_MAX<<1 defined?

#3014
From: Norman Diamond
Date: Mon, 14 Dec 1992 00:52
27 lines
2124 bytes
In article <1992Dec11.173855.19517@crd.ge.com> volpe@ausable.crd.ge.com writes:
>Section 3.3 says "These [bitwise] operators return values that depend on the
>internal representations of integers, and thus have implementation defined
>aspects for signed types."

Yeah, this means that even when the operation succeeds, the resulting VALUE
still has implementation defined aspects.  It doesn't say anything about
failed operations.

>The standard makes an explicit statement showing a qualitative difference
>between bitwise operators and non-bitwise operators,

Yes.

>indicating that bitwise operators operate in "representation-space" while
>other operators operate in "math-space". 

I don't think the standard says this so clearly.  We can't even rely on the
base document to answer this, because in pre-standard days of a substitute
assembly language, I think ALL operators were regarded as operating in
representation-space.  If you think the standard maintained the old concept
in a fragment of C's operations, I think you have to ask for an interpretation
ruling.
--
Norman Diamond       diamond@jit081.enet.dec.com
If this were the company's opinion, I wouldn't be allowed to post it.
"It's been a lovely recession."
Technical Details
Message-ID: <Bz854A.D10@jrd.dec.com>
Path: arc1-ca.pugleaf.net!sparky!uunet!wupost!sdd.hp.com!elroy.jpl.nasa.gov!decwrl!deccrl!news.crl.dec.com!dbased.nuo.dec.com!e2big.mko.dec.com!jrdzzz.jrd.dec.com!jit533.jit.dec.com!diamond
References: <723345673snx@genesis.demon.co.uk> <2337@sdrc.COM> <Byvxys.KKz@twwells.com> <bkt_QYTN@twinsun.com> <1992Dec1.110325.29337@dg-rtp.dg.com> <19482@ksr.com> <bkvw0kfF@twinsun.com> <19685@ksr.com> <1992Dec7.163618.26955@crd.ge.com> <1992Dec1.050540 <1992Dec8.1 <1992Dec11.173855.19517@crd.ge.com>

Show Full Headers
Complete Article Headers
Newsgroups: comp.std.c
Path: arc1-ca.pugleaf.net!sparky!uunet!wupost!sdd.hp.com!elroy.jpl.nasa.gov!decwrl!deccrl!news.crl.dec.com!dbased.nuo.dec.com!e2big.mko.dec.com!jrdzzz.jrd.dec.com!jit533.jit.dec.com!diamond
From: diamond@jit533.jit.dec.com (Norman Diamond)
Subject: Re: Is INT_MAX<<1 defined?
Message-ID: <Bz854A.D10@jrd.dec.com>
Sender: usenet@jrd.dec.com (USENET News System)
Nntp-Posting-Host: jit533.jit.dec.com
Reply-To: diamond@jit.dec.com (Norman Diamond)
Organization: Digital Equipment Corporation Japan , Tokyo
References: <723345673snx@genesis.demon.co.uk> <2337@sdrc.COM> <Byvxys.KKz@twwells.com> <bkt_QYTN@twinsun.com> <1992Dec1.110325.29337@dg-rtp.dg.com> <19482@ksr.com> <bkvw0kfF@twinsun.com> <19685@ksr.com> <1992Dec7.163618.26955@crd.ge.com> <1992Dec1.050540 <1992Dec8.1 <1992Dec11.173855.19517@crd.ge.com>
Date: Mon, 14 Dec 1992 00:52:58 GMT
Lines: 27