test-sizeof: show that a small 64 field is not enough to force the enum to be 64...
authorZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>
Tue, 22 May 2018 07:07:35 +0000 (09:07 +0200)
committerZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>
Tue, 22 May 2018 08:09:07 +0000 (10:09 +0200)
commit994282d2dedfda8a4a89ba1735637884a3dc3a2d
tree98ddae0d4767b7fa6a8eca93a87d0e57ff324cae
parent930362ab26afdd18fe22738cbfb1c374ae928c49
test-sizeof: show that a small 64 field is not enough to force the enum to be 64 bits

On both 32 and 64 bits, the result is:
enum Enum → 32 bits, unsigned
enum BigEnum → 32 bits, unsigned
enum BigEnum2 → 64 bits, unsigned
big_enum2_pos → 4
big_enum2_neg → 8

The last two lines show that even if the enum is 64 bit, and the field of an
enum is defined with UINT64_C(), the field can still be smaller.
src/test/test-sizeof.c