Re: bitwise operator !!
- From: Flash Gordon <smap@xxxxxxxxxxxxxxxxx>
- Date: Fri, 12 Dec 2008 19:49:05 +0000
CBFalconer wrote, On 09/12/08 01:22:
Flash Gordon wrote:
CBFalconer wrote:... snip ...
blargg wrote:
I think the standards committee disagreed with you since theySorry if I'm repeating myself from another message (or forgot theAnd then, on such a machine, you have an illegal bit pattern for an
reason given), but couldn't a compiler on a two's complement
platform do the same thing, define INT_MIN to be -INT_MAX? For
example, if int is 16 bits on such a machine, then INT_MAX would
be 32767 and INT_MIN would be -32767. Then you're guaranteed that
every valid value of an int can be negated properly.
integer left over. No other languages or programs on that machine
understand this. What are you going to do with it?
explicitly allow what you are denigrating. In any case, how do you
know the no other languages would understand it? The most likely
time it would occur is on a processor which would/could trap on it
(or possibly do a hard limit on arithmetic at +/-32767. There are
even good reasons for this behaviour to be desired in signal
processing.
I'm not disagreeing with you. I AM disagreeing with the
advisability of implementing blarggs suggestion.
Blarg is suggesting an implementation could have INT_MIN = -INT_MAX with
2s complement. I am suggesting that not only is this allowed but that
there are actually very good reasons why this might be done. So I don't
see how you can be suggesting that implementing Blargg's suggestion is
inadvisable without disagreeing with my claim that there are good
reasons to implement what Blarrg is suggesting.
To be clear, I think there are *very* good reasons to implement what
Blarrg is suggesting could be implemented, so I believe that any banket
suggestion that doing so is inadvisable is just plain wrong.
--
Flash Gordon
If spamming me sent it to smap@xxxxxxxxxxxxxxxxx
If emailing me use my reply-to address
See the comp.lang.c Wiki hosted by me at http://clc-wiki.net/
.
- Follow-Ups:
- Re: bitwise operator !!
- From: CBFalconer
- Re: bitwise operator !!
- References:
- bitwise operator !!
- From: chang
- Re: bitwise operator !!
- From: Jujitsu Lizard
- Re: bitwise operator !!
- From: Ben Bacarisse
- Re: bitwise operator !!
- From: Jujitsu Lizard
- Re: bitwise operator !!
- From: Ben Bacarisse
- Re: bitwise operator !!
- From: Jujitsu Lizard
- Re: bitwise operator !!
- From: Nate Eldredge
- Re: bitwise operator !!
- From: Jujitsu Lizard
- Re: bitwise operator !!
- From: jameskuyper
- Re: bitwise operator !!
- From: blargg
- Re: bitwise operator !!
- From: CBFalconer
- Re: bitwise operator !!
- From: Flash Gordon
- Re: bitwise operator !!
- From: CBFalconer
- bitwise operator !!
- Prev by Date: Re: C/Ubuntu ][ Problem in Buffer Overflow logic
- Next by Date: Re: Noncompliant codes
- Previous by thread: Re: bitwise operator !!
- Next by thread: Re: bitwise operator !!
- Index(es):
Relevant Pages
|