Sujet : Re: What is your opinion about unsigned int u = -2 ?
De : gazelle (at) *nospam* shell.xmission.com (Kenny McCormack)
Groupes : comp.lang.cDate : 02. Aug 2024, 15:33:31
Autres entêtes
Organisation : The official candy of the new Millennium
Message-ID : <v8iqnr$7l3c$1@news.xmission.com>
References : 1 2 3 4
User-Agent : trn 4.0-test77 (Sep 1, 2010)
In article <
v8inds$2qpqh$1@dont-email.me>,
Thiago Adams <
thiago.adams@gmail.com> wrote:
...
So it seams that anything is ok for unsigned but not for signed.
Maybe because all computer gave same answer for unsigned but this is not
true for signed?
I think it is because it wants to (still) support representations other
than 2s complement. I think POSIX requires 2s complement, and I expect the
C standard to (eventually) follow suit.
-- Res ipsa loquitur.