Yup, 1-bit enum bitfields are a problem because enums are signed in VC++. 1-bit int bitfields would show the same problem in gcc - a bitfield that can't store
'1' (0 and -1 only) is confusing.

Additionally the packing rules for bitfields can vary between compilers. In
particular, in VC++ different sized bitfield storage types don't pack together,
so bool doesn't pack with short or int, int doesn't pack with short, etc.

What a mess.

The initial problem was found by VC++'s /analyze which pointed out that we were
comparing one of the bitfields to '1', which is a value it could never have.

https://codereview.chromium.org/700963002/

--
--
v8-dev mailing list
[email protected]
http://groups.google.com/group/v8-dev
--- You received this message because you are subscribed to the Google Groups "v8-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/d/optout.

Reply via email to