https://gcc.gnu.org/bugzilla/show_bug.cgi?id=109516
Andrew Pinski <pinskia at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|UNCONFIRMED |RESOLVED
See Also| |https://gcc.gnu.org/bugzill
| |a/show_bug.cgi?id=92684,
| |https://gcc.gnu.org/bugzill
| |a/show_bug.cgi?id=94631,
| |https://gcc.gnu.org/bugzill
| |a/show_bug.cgi?id=107403
Resolution|--- |INVALID
--- Comment #1 from Andrew Pinski <pinskia at gcc dot gnu.org> ---
>(For the record, clang doesn't report such warning).
That is because there is another implement defined part of the C spec dealing
with bitfields and GCC and clang decided to implement this differently., this
is mentioned here: https://gcc.gnu.org/legacy-ml/gcc/2017-10/msg00192.html
Basically GCC decided that the type of the bitfield uint48 has a type of
unsigned:48 and since it is larger size than int, it does not get promoted to
int and in this cases gets passed to the variadic function as that type. While
clang decided that the type is still unsigned long long.
Both behaviors are allowed by the C standard even.