Add command-line option to specify signedness of 'int' bit-fields. #4865
Labels
bugzilla
Issues migrated from bugzilla
clang:frontend
Language frontend issues, e.g. anything involving "Sema"
wontfix
Issue is real, but we can't or won't fix it. Not invalid
Extended Description
According to the C99 standard (6.7.2p5):
"[...] it is implementation-defined whether the specifier 'int' designates the same type as 'signed int' or the same type as 'unsigned int'."
Similarly, in the C89 standard it is said:
"Each of the above comma-separated lists designates the same type,
except that for bit-field declarations, signed int (or signed ) may
differ from int (or no type specifiers)."
clang seems to be missing a language/target option to specify this implementation-defined behavior.
This should be added and exposed by supporting the GNU -fsignedbitfields -funsigned-bitfields command-line options.
The text was updated successfully, but these errors were encountered: