https://gcc.gnu.org/bugzilla/show_bug.cgi?id=127383
Jakub Jelinek <jakub at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |jakub at gcc dot gnu.org
--- Comment #2 from Jakub Jelinek <jakub at gcc dot gnu.org> ---
(In reply to Richard Biener from comment #1)
> long long unsigned int w = ~(long long unsigned int) s.f;
>
> the promotion behavior of s.f looks guilty. note long long f : 63
> would not promote to long long; > int bitfields are a GNU extension,
> maybe _BitInt bitfields are now standard.
C17 said:
"A bit-field shall have a type that is a qualified or unqualified version of
_Bool , signed int, unsigned int, or some other implementation-defined type. It
is implementation-defined whether atomic types are permitted."
and GCC allowing long/unsigned long/long long/unsigned long
long/__int128/unsigned __int128 etc. bit-field was implementation-defined part.
C23 has:
A bit-field shall have a type that is a qualified or unqualified bool, signed
int, unsigned int, a bit-precise integer type, or other implementation-defined
type. It is implementation-defined whether atomic types are permitted.
so bitint is always supported, the above mentioned types are still
implementation-defined.