Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Closed
llvmbot opened this issue Jul 2, 2009 · 3 comments
Closed

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

llvmbot opened this issue Jul 2, 2009 · 3 comments
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

Comments

@llvmbot
Copy link
Member

llvmbot commented Jul 2, 2009

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.

@llvmbot
Copy link
Member Author

llvmbot commented Jul 2, 2009

Implementation-defined doesn't mean we have to support both ways; it is OK to pick one (but I believe there is a requirement about documentation that we may not meet). It is probably a good idea to support compatibility with gcc on this one, though.

@efriedma-quic
Copy link
Collaborator

(but I believe there is a requirement about documentation that we may
not meet).

C99 4p8, to be precise. And yes, we're missing documentation of all the implementation-defined choices.

@chandlerc
Copy link
Member

There has been no movement on this in years.

No sense keeping a bug for one of the many implementation defined aspects of
Clang that are not documented.

This issue was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
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
Projects
None yet
Development

No branches or pull requests

4 participants