Hello,
For context, this was the mail from Jakub (containing some text explaining
a potential patch):
https://gcc.gnu.org/pipermail/gcc-patches/2021-November/585630.html
and this is the bug report about a problem in GCC regarding zero-width
bit-fields, where there was a difference between C and C++ (now fixed):
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=102024
and Jakub now contemplates to add a -Wpsabi warning about this case but
wants to have the various psABIs be clarified.
My take: I see no reason why the particular bit position of a zero-width
bit-field should matter: if it's naturally aligned already then it doesn't
matter, and if it isn't then the following fields should be aligned as
requested. So that's a case for handling zero-width bit-fields
consistently.
Now, NO_CLASS or INTEGER: conceptually NO_CLASS is the right choice, there
are no bits in a zero-width bit-field, nothing is in there that could have
a class. And it's certainly unexpected that a zero-width bit-field
tacked between two floats makes the whole thing not be class SSE/X87,
especially because it does so only when the bitposition isn't 64-bit
aligned.
So, yeah, I think zero-width bit-fields should be explicitely NO_CLASS for
class merging purposes (instead of INTEGER). The other effects of them
regarding alignment and spacing of following fields not withstanding of
course, that's orthogonal.
Any other opinions?
Ciao,
Michael.