Lots of bugs in <limits.h> ?
Joseph S. Myers
jsm28@cam.ac.uk
Mon Dec 30 15:46:00 GMT 2002
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
More information about the Gcc
mailing list