This is the mail archive of the gcc@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Lots of bugs in <limits.h> ?


On Mon, 30 Dec 2002, Neil Booth wrote:

> Reading the C standard carefully leads me to believe that the macros
> like
> 
> UINT_MAX, LONG_MIN
> 
> etc. should be values, and not typed integer constants like "65535U"
> nor expressions like "(-LONG_MAX - 1)".

They are "constant expressions suitable for use in #if preprocessing
directives", "expressions that have the same type as would an expression
that is an object of the corresponding type converted according to the
integer promotions", as required by C99.  As I've already pointed out on
libc-alpha
<http://sources.redhat.com/ml/libc-alpha/2002-12/msg00088.html>,
Dinkumware's page is simply wrong about the requirements for the
<stdint.h> macros, which are specified as applying to constants (not
constant expressions), both before and after TC1.

-- 
Joseph S. Myers
jsm28@cam.ac.uk


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]