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

--- Comment #2 from Andrew Pinski <pinskia at gcc dot gnu.org> ---
bit-fields in C is a type.
while in C++, it is not.

So:
st.v2 << 3

This is not ((long)st.v2) << 3 but rather (long:45)<<3.  So it gets truncated.

C11:
ffff0000fff8
0xffff0000fff80000
1fff0000fff8
1 2 ffffffff80000000

C++14:
ffff0000fff8
0xffff0000fff80000
ffff0000fff8
1 2 ffffffff80000000

Reply via email to