warning: decimal constant is so large that it is unsigned
Pergola, Michael
MichaelPergola@Danfoss.com
Fri Oct 26 11:46:00 GMT 2001
Neil,
Thanks for the prompt reply. If gcc is truly taking this as two tokens,
then,
yes it would be a help in telling me that 2147483648 is really too large for
an int assignment. The question would then be, should it be represented as
its hexadecimal equivalent 0x80000000? And why would gcc take this as
two tokens and not keep the negative sign with the value?
Mike
> -----Original Message-----
> From: Neil Booth [SMTP:neil@daikokuya.demon.co.uk]
> Sent: Friday, October 26, 2001 2:41 PM
> To: Pergola, Michael
> Cc: 'gcc-bugs@gcc.gnu.org'; Tom Englert (E-mail)
> Subject: Re: warning: decimal constant is so large that it is
> unsigned
>
> Pergola, Michael wrote:-
>
> > I am using the gcc cross compiler for the Power PC [gcc version
> > 2.95.2 19991030 (2.95.3 prerelease/franzo)] and am getting a weird
> warning.
> > It seems that I have set an int value to its minimum value of
> -2147483648.
> > The compiler gives me the warning of:
> >
> > /home/usac0314/xena-sandbox/xena-prototypes/code/database/db-dat.c:6150:
> > warning: decimal constant is so large that it is unsigned
>
> "-2147483648" is two tokens: "-" and "2147483648". The latter has
> type "int". Does that help?
>
> Neil.
More information about the Gcc-bugs
mailing list