[Bug c/83294] int32_t & related definitions wrong with -funsigned-bitfields

joseph at codesourcery dot com gcc-bugzilla@gcc.gnu.org
Mon Mar 12 23:39:00 GMT 2018


https://gcc.gnu.org/bugzilla/show_bug.cgi?id=83294

--- Comment #6 from joseph at codesourcery dot com <joseph at codesourcery dot com> ---
The response to C99 DR#315 says that for all the types not specifying 
"signed" or "unsigned" explicitly, if an implementation accepts them as 
bit-field types it's implementation-defined what the signedness is.  
That's compatible with C++ up to C++11 (C++14 removed the special-casing 
allowing plain int etc. bit-fields to be unsigned).

C11 footnote 125 explicitly refers to "typedef-name defined as int", so 
the intent is clear even if that's not explicit in normative text.


More information about the Gcc-bugs mailing list