help-flex
[Top][All Lists]
Advanced

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

C99 integer types


From: John Millaway
Subject: C99 integer types
Date: Mon, 25 Nov 2002 12:08:02 -0500 (EST)

> Can someone post a confirmation that the int*_t types are optional?
> If that's the case, then we have a very different problem on our
> hands. (Section numbers from the C99 standard or quotations or urls
> so we can all check up on it.)


The exact-width integers are optional.  The 'at-least' integers are
required.  Here are the relevant sections of the C99 January 18, 1999
*draft*:

7.18.1.1  Exact-width integer types

        [#1] The typedef name intN_t  designates  a  signed  integer
        type  with  width  N.  Thus, int8_t denotes a signed integer
        type with a width of exactly 8 bits.

        [#2] The typedef name uintN_t designates an unsigned integer
        type  with  width  N.   Thus,  uint24_t  denotes an unsigned
        integer type with a width of exactly 24 bits.

        [#3]   These   types   are   optional.    However,   if   an
        implementation  provides integer types with widths of 8, 16,
        32, or 64 bits, it shall define  the  corresponding  typedef
        names.

7.18.1.2  Minimum-width integer types

        [#1]  The  typedef  name  int_leastN_t  designates  a signed
        integer type with a width of at least N, such that no signed
        integer  type  with  lesser  size has at least the specified
        width.  Thus, int_least32_t denotes a  signed  integer  type
        with a width of at least 32 bits.

        [#2]  The  typedef name uint_leastN_t designates an unsigned
        integer type with a width  of  at  least  N,  such  that  no
        unsigned  integer  type  with  lesser  size has at least the
        specified width.  Thus, uint_least16_t denotes  an  unsigned
        integer type with a width of at least 16 bits.

        [#3] The following types are required:

                        int_least8_t              uint_least8_t
                        int_least16_t             uint_least16_t
                        int_least32_t             uint_least32_t
                        int_least64_t             uint_least64_t







reply via email to

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