Skip to content

Add command-line option to specify signedness of 'int' bit-fields. #4865

Closed
@llvmbot

Description

@llvmbot
Bugzilla Link 4493
Resolution WONTFIX
Resolved on Jun 13, 2012 13:24
Version unspecified
OS Linux
Reporter LLVM Bugzilla Contributor
CC @efriedma-quic

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugzillaIssues migrated from bugzillaclang:frontendLanguage frontend issues, e.g. anything involving "Sema"wontfixIssue is real, but we can't or won't fix it. Not invalid

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions