int8_t typedef problem

Ralf Corsepius corsepiu at faw.uni-ulm.de
Tue Jan 7 15:44:12 UTC 2003


Am Die, 2003-01-07 um 15.29 schrieb Stephen Holford:
> Hi Joel
> 
> > 
> > Thanks.  What about the other intXX_t types?  Should they say signed?
> 
> Not necessary as all arithmetic types other than chars and bitfields are 
> signed by default. One thing to note with the "signed" keyword is it 
> isn't K&R compatible,
Does RTEMS still support pre-ANSI C? I hope we don't and I am pretty
sure RTEMS will not compile using a KnR-compiler.

>  it was introduced in the C89 standard. 
intXX_t types are C99. 

>From SUSV3:

<citation>
Exact-width integer types
        
        The typedef name int N _t designates a signed integer type with
        width N, no padding bits, and a two's-complement representation.
        Thus, int8_t denotes a signed integer type with a width of
        exactly 8 bits.
        
        The typedef name uint N _t designates an unsigned integer type
        with width N. Thus, uint24_t denotes an unsigned integer type
        with a width of exactly 24 bits.
        
        [CX] [Option Start] The following types are required:
        
        
        int8_t
        int16_t
        int32_t
        uint8_t
        uint16_t
        uint32_t[Option End]
        
        
        If an implementation provides integer types with width 64 that
        meet these requirements, then the following types are required:
        int64_t uint64_t

<citation>

Ralf





More information about the users mailing list