This is the mail archive of the libc-help@sourceware.org mailing list for the glibc 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]

Definition of unit32_t based on an implementation-dependent type?


The C standard says that the type 'int' is implementation-dependent.
Yet stdint.h uses 'int' to typedef 32 bit values:

      typedef unsigned int uint32_t;
      typedef int int32_t;

The 'int' and 'unsigned int' types can (and do) have different sizes
dependent on the compiler and the machine.  So 'int32_t' and
'uint32_t' will not necessarily have 32-bit sizes.  Either this is a
bug, or it is very misleading!

Dave


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