This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
Re: integer
- To: Nestor Alvarez <nestor at computec dot com>
- Subject: Re: integer
- From: Alexandre Oliva <aoliva at cygnus dot com>
- Date: 23 Mar 2000 05:55:26 -0300
- Cc: gcc-bugs at gcc dot gnu dot org
- Organization: Cygnus Solutions, a Red Hat Company
- References: <38D9E4BC.8BC99936@computec.com>
On Mar 23, 2000, Nestor Alvarez <nestor@computec.com> wrote:
> int i=-2147483648;
> "warning: decimal integer constant is so large that it is unsigned"
> I think this is a bug
Nope, it's correct. According to the C standard, `-' and `2147483648'
are two separate tokens, and the second one is so large that it is
unsigned. That's why INT_MIN, for example, is defined as (-INT_MAX-1).
--
Alexandre Oliva Enjoy Guaranį, see http://www.ic.unicamp.br/~oliva/
Cygnus Solutions, a Red Hat company aoliva@{redhat, cygnus}.com
Free Software Developer and Evangelist CS PhD student at IC-Unicamp
oliva@{lsd.ic.unicamp.br, gnu.org} Write to mailing lists, not to me