[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index][Thread Index][Top&Search][Original]
Re: [PATCH] avoid confusing gcc with -2147483648
On Sat, 17 Jan 2009 16:24:30 -0000, "Robin Barker"
<Robin.Barker@npl.co.uk> wrote:
>
> >
> > I prefer the L addition. I asked before. Is one 'L' sufficient,
> > or does it *need* the double LL?
>
> It needs to be LL
>
> Compiling with -Wall -pedantic
> int main { exit( -2147483648 ); }
> warning: this decimal constant is unsigned only in ISO C90
> int main { exit( -2147483648L ); }
> warning: this decimal constant is unsigned only in ISO C90
> int main { exit( -2147483648LL ); }
> warning: use of C99 long long integer constant
Ouch. The rest of perl is still C89 compliant, so that won't work either
I guess
--
H.Merijn Brand http://tux.nl Perl Monger http://amsterdam.pm.org/
using & porting perl 5.6.2, 5.8.x, 5.10.x, 5.11.x on HP-UX 10.20, 11.00,
11.11, 11.23, and 11.31, SuSE 10.1, 10.3, and 11.0, AIX 5.2, and Cygwin.
http://mirrors.develooper.com/hpux/ http://www.test-smoke.org/
http://qa.perl.org http://www.goldmark.org/jeff/stupid-disclaimers/
- References to:
-
"H.Merijn Brand" <h.m.brand@xs4all.nl>
"Robin Barker" <Robin.Barker@npl.co.uk>
[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index][Thread Index][Top&Search][Original]