https://gcc.gnu.org/bugzilla/show_bug.cgi?id=82192
--- Comment #3 from joseph at codesourcery dot com <joseph at codesourcery dot
com> ---
On Tue, 12 Sep 2017, vsevolod.livinskij at frtk dot ru wrote:
> struct struct_t {
> unsigned int memb : 13;
> };
>
> extern struct_t b;
> printf("%llu\n", b.memb);
unsigned int : 13 (promoted to int - I think C++ promotes
narrower-than-int bit-fields to int, though for C++ the bit-field width is
not considered part of the type) is not valid for printf %llu. You need
to explicitly cast to unsigned long long.