Hi
I've spent some time debugging mingw-qt5-qtwebkit being FTBFS since the
last mass rebuild, and I've narrowed it down to this:
struct Foo {
unsigned u1 : 5;
unsigned u2 : 5;
unsigned u3 : 3;
unsigned u4 : 3;
unsigned u5 : 4;
unsigned u6 : 2;
unsigned u7 : 3;
unsigned u8 : 2;
unsigned u9 : 1;
unsigned u10 : 3;
// 31 bits
unsigned u11 : 2;
unsigned u12 : 2;
unsigned u13 : 2;
unsigned u14 : 6;
unsigned u15 : 7;
unsigned u16 : 1;
unsigned u17 : 1;
unsigned u18 : 1;
unsigned u19 : 1;
unsigned u20 : 1;
bool bar() const { return false; }
private:
unsigned u21 : 1;
unsigned u22 : 1;
unsigned u23 : 1;
unsigned u24 : 1;
// 59 bits
};
COMPILE_ASSERT((sizeof(Foo) <= 8), Foo_does_not_grow);
The COMPILE_ASSERT fails, since apparently sizeof(Foo) = 12. But without
the bool bar() member function, sizeof(Foo) = 8, which is what I would
expect regardless of the presence of (non-virtual) member functions - as
far as my C/C++ knowledge goes, non-virtual functions should not take up
any space. Am I missing something, or is this a compiler issue?
(Coincidentally, the failed build used mingw-gcc-8.1.0 which landed
before the mass rebuild, but previous (successful) builds were performed
with mingw-gcc-7.3.0).
Thanks
Sandro
_______________________________________________
devel mailing list -- devel@xxxxxxxxxxxxxxxxxxxxxxx
To unsubscribe send an email to devel-leave@xxxxxxxxxxxxxxxxxxxxxxx
Fedora Code of Conduct: https://getfedora.org/code-of-conduct.html
List Guidelines: https://fedoraproject.org/wiki/Mailing_list_guidelines
List Archives: https://lists.fedoraproject.org/archives/list/devel@xxxxxxxxxxxxxxxxxxxxxxx/message/WWHGSJJZQO2HZDZ6MG32YINHKQ3MQ7LK/