What's the meaning of this warning: this decimal constant is unsignedonly in ISO C90

Discussion in 'C++' started by Nan Li, Dec 13, 2008.

  1. Nan Li

    Nan Li Guest

    Hello,

    Can any one help me understand the meaning of this warning: this
    decimal constant is unsigned only in ISO C90 ? I think -2147483648 is
    the min number for 32 bit signed integer.

    #include <stdint.h>

    static const int32_t value = -2147483648;

    warning: this decimal constant is unsigned only in ISO C90

    gcc version 4.0.2 20051125


    Thanks !
     
    Nan Li, Dec 13, 2008
    #1
    1. Advertising

  2. Re: What's the meaning of this warning: this decimal constant isunsigned only in ISO C90

    Jack Klein wrote:
    > It would be much better to use the macro INT32_MIN, from <stdint.h>,
    > in the initialization.


    For what it's worth, at least here INT32_MIN is defined as:
    (-2147483647-1)

    The reason is probably what you explained.
     
    Juha Nieminen, Dec 14, 2008
    #2
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Franck DARRAS
    Replies:
    12
    Views:
    663
    Jim Higson
    Aug 23, 2004
  2. Alexei Polkhanov
    Replies:
    11
    Views:
    2,491
  3. Replies:
    13
    Views:
    6,506
    Dave Thompson
    Dec 20, 2004
  4. fctk

    big decimal integer constant warning

    fctk, Mar 29, 2006, in forum: C Programming
    Replies:
    6
    Views:
    505
    Michael Mair
    Apr 1, 2006
  5. Replies:
    4
    Views:
    815
Loading...

Share This Page