[Bug c/65331] C99 format macros doesn't accept bit fields for 64-bit integer types

joseph at codesourcery dot com gcc-bugzilla@gcc.gnu.org
Sat Mar 7 00:20:00 GMT 2015


https://gcc.gnu.org/bugzilla/show_bug.cgi?id=65331

--- Comment #2 from joseph at codesourcery dot com <joseph at codesourcery dot com> ---
Indeed, for C bit-field width is considered part of the type, meaning no 
promotion for those wider than int (and no way for va_arg to extract the 
value of such a bit-field passed to a variadic function, and no matching 
formats).  You need to cast such bit-fields to an appropriate type when 
passing to printf.



More information about the Gcc-bugs mailing list