This is the mail archive of the gcc-patches@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: [4.5 C] Provide <stdint.h> (bug 448)


On Thu, 30 Apr 2009, Eric Botcazou wrote:

> The latter file has:
> 
> /*
>  * intmax_t and uintmax_t are to be the longest (in number of bits) signed
>  * and unsigned integer types supported by the implementation.
>  */
> #if defined(_LP64) || ( !defined(__STRICT_ANSI__) && !defined(_NO_LONGLONG))
> typedef int64_t                 intmax_t;
> typedef uint64_t                uintmax_t;
> #else
> typedef int32_t                 intmax_t;
> typedef uint32_t                uintmax_t;
> #endif
> 
> 
> What's the proper solution?

Ensure the 64-bit definitions are used unconditionally; they are required 
for C99 conformance.  I don't know whether you should fix the header or 
arrange for _NO_LONGLONG not to be defined, as I don't know where 
_NO_LONGLONG is defined and what other effects it may have.

-- 
Joseph S. Myers
joseph@codesourcery.com


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