This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: Is this warning valid?
- To: "H.J. Lu" <hjl at lucon dot org>
- Subject: Re: Is this warning valid?
- From: Branko Cibej <branko dot cibej at hermes dot si>
- Date: Sat, 21 Nov 1998 10:05:58 +0100
- Cc: egcs at cygnus dot com
- Organization: HERMES SoftLab
- References: <m0zh5Vy-000395C@ocean.lucon.org>
"H.J. Lu" wrote:
> Hi,
>
> # gcc -c x.c
> x.c:1: warning: decimal constant is so large that it is unsigned
>
> Why does gcc complain this? Does gcc think
>
> -2147483648 != (-2147483647 -1)
The catch is that the `-' isn't part of the literal. The compiler
doesn't see `(-2147483648)', it sees `-(2147483648)'. AFAIK this is
correct WRT the standard.
Brane
--
Branko Cibej <branko.cibej@hermes.si>
HERMES SoftLab, Litijska 51, 1000 Ljubljana, Slovenia
phone: (++386 61) 186 53 49 fax: (++386 61) 186 52 70