This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c/83294] int32_t & related definitions wrong with -funsigned-bitfields
- From: "joseph at codesourcery dot com" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Tue, 05 Dec 2017 21:21:44 +0000
- Subject: [Bug c/83294] int32_t & related definitions wrong with -funsigned-bitfields
- Auto-submitted: auto-generated
- References: <bug-83294-4@http.gcc.gnu.org/bugzilla/>
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=83294
--- Comment #1 from joseph at codesourcery dot com <joseph at codesourcery dot com> ---
I'm not aware of a standard requirement not to use plain int for int32_t
(even with unsigned bit-fields), though it may well be useful to make the
signedness explicit. After all, int is a signed integer type with 32 bits
in the cases where it's used for int32_t. (However, plain char is never
OK as int8_t / uint8_t etc. because char is an integer type but not a
signed integer type or unsigned integer type.)
On most platforms, except with -ffreestanding GCC just wraps libc's
stdint.h, so this is mostly a libc quality-of-implementation issue, not
just a GCC one.