unsigned

Trevis Rothwell tjr@gnu.org
Mon Dec 4 21:48:00 GMT 2006


Given the following program:

  int main()
  {
    unsigned int squiggy = 2147483648;
  }

Compliing on GCC 3.2.3, I get the following warning:

  $ gcc foo.c
  foo.c: In function `main':
  foo.c:3: warning: decimal constant is so large that it is unsigned

To the best of my knowledge, 2147483648 should fit with ample room to
spare in an unsigned (4-byte) integer.

What's going on?



More information about the Gcc-help mailing list