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

N

Nan Li

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 !
 
J

Juha Nieminen

Jack said:
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.
 

Ask a Question

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

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,769
Messages
2,569,579
Members
45,053
Latest member
BrodieSola

Latest Threads

Top