This is the mail archive of the
newlib@sourceware.org
mailing list for the newlib project.
RE: stdint.h
- From: "Jon Beniston" <jon at beniston dot com>
- To: <newlib at sources dot redhat dot com>,<newlib at sourceware dot org>
- Date: Tue, 20 Sep 2005 18:05:27 +0100
- Subject: RE: stdint.h
> I'd like to point out that the glibc version of stdint.h also uses the
> (-2147483647 - 1) variation. There must be a good reason,
> but I fail to find a reference right now, which could help to
> explain this to all of us.
Doesn't your version of gcc output:
warning: this decimal constant is unsigned only in ISO C90
Try -std=gnu99 and you might get a different result.
In C90 mode, GCC treats 2147483648 as an unsigned int. It then negates it,
before casting to a long long, and -2147483648 is the same as 2147483648 in
only 32-bits.
Cheers,
Jon