This is the mail archive of the
libc-help@sourceware.org
mailing list for the glibc project.
Definition of unit32_t based on an implementation-dependent type?
- From: David Wuertele <wuertele at gmail dot com>
- To: libc-help at sourceware dot org
- Date: Tue, 20 Oct 2009 10:31:59 -0700
- Subject: 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