This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [4.5 C] Provide <stdint.h> (bug 448)
- From: "Joseph S. Myers" <joseph at codesourcery dot com>
- To: Eric Botcazou <ebotcazou at adacore dot com>
- Cc: gcc-patches at gcc dot gnu dot org, bkorb at gnu dot org
- Date: Thu, 30 Apr 2009 10:16:23 +0000 (UTC)
- Subject: Re: [4.5 C] Provide <stdint.h> (bug 448)
- References: <Pine.LNX.4.64.0811080004030.19936@digraph.polyomino.org.uk> <200904301209.37203.ebotcazou@adacore.com>
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