This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Re: integer


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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]