bug-gnulib
[Top][All Lists]
Advanced

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

result type of INT16_C, UINT16_C


From: Bruno Haible
Subject: result type of INT16_C, UINT16_C
Date: Sat, 17 Jun 2006 19:43:12 +0200
User-agent: KMail/1.9.1

Hi Paul,

You noted that ISO C 99, in sections 7.18.2 and 7.18.3 wants
macros that expand to expressions that "shall have the same type as would
an expression that is an object of the corresponding type converted
according to the integer promotions".

However, 7.18.4 wants macros that expand to integer constants that
are of type int_leastN_t or uint_leastN_t. But integer constants
don't contain casts (section 6.4.4.1) - therefore it is impossible
to write down integer constants of type, say, int_least16_t or
uint_least16_t. How can INT16_C, UINT16_C be defined then?

This affects both glibc's <stdint.h> and gnulib's replacement.

Bruno




reply via email to

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