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

--- Comment #4 from Vsevolod Livinskiy <vsevolod.livinskij at frtk dot ru> ---
(In reply to jos...@codesourcery.com from comment #3)
> 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.

printf("%llu\n", (unsigned long long int)b.memb)
doesn't eliminate the error

Reply via email to