[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: xstrtoimax compilation warning on Solaris 7

From: Larry Jones
Subject: Re: xstrtoimax compilation warning on Solaris 7
Date: Tue, 8 Nov 2005 23:51:32 -0500 (EST)

Eric Blake writes:
> According to Paul Eggert on 11/8/2005 2:18 PM:
> > 
> > It's not really a bug, is it?  The limits.h values have the correct
> > types.  It's merely an incompatibility between the Solaris 7 limits.h
> > and GCC's warnings heuristic.
> No, the values in Solaris 7 limits.h were of type int (they had no L or LL
> suffix), but greater than 31 bits, so the warning is valid.

Go read the C standard: unsuffixed values which are too large to fit in
an int have type long (or long long, if necessary).  GCC warns about
that since it may not have been intended, but Paul is right: because of
their magnitudes, the values *do* have the correct types, despite the
lack of suffixes.

-Larry Jones

Monopoly is more fun when you make your own Chance cards. -- Calvin

reply via email to

[Prev in Thread] Current Thread [Next in Thread]