Quuxplusone / LLVMBugzillaTest

0 stars 0 forks source link

Support for unsigned bitfields #46708

Open Quuxplusone opened 4 years ago

Quuxplusone commented 4 years ago
Bugzilla Link PR47739
Status NEW
Importance P enhancement
Reported by Robert Dumitru (robert.dumitru@cyberthorstudios.com)
Reported on 2020-10-06 00:37:07 -0700
Last modified on 2020-10-06 13:18:05 -0700
Version trunk
Hardware All Windows NT
CC llvm-bugs@lists.llvm.org, neeilans@live.com, richard-llvm@metafoo.co.uk
Fixed by commit(s)
Attachments
Blocks
Blocked by
See also
Hi,

As we can see inside Clang.cpp - -fsigned-bitfields is default, and clang
doesn't yet support -funsigned-bitfields.

-fsigned-bitfields
-funsigned-bitfields
-fno-signed-bitfields
-fno-unsigned-bitfields

These options control whether a bit-field is signed or unsigned, when the
declaration does not use either signed or unsigned.

Is there a plan to support -funsigned-bitfields?
I could not find a ticket for it.

Best regards,
Robert
Quuxplusone commented 4 years ago

No plans as of yet. If someone wanted to contribute an implementation, I expect we'd accept it for GCC compatibility. (It should be C-only, though, because C++ specifies that plain bit-fields are always signed.)