This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
RE: warning: decimal constant is so large that it is unsigned
- To: 'Neil Booth' <neil at daikokuya dot demon dot co dot uk>
- Subject: RE: warning: decimal constant is so large that it is unsigned
- From: "Pergola, Michael" <MichaelPergola at Danfoss dot com>
- Date: Fri, 26 Oct 2001 20:46:32 +0200
- Cc: "'gcc-bugs at gcc dot gnu dot org'" <gcc-bugs at gcc dot gnu dot org>, "Tom Englert (E-mail)" <EnglertTom at aol dot com>
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.