test-sizeof: print the alignments too
This commit is contained in:
parent
3c7dddaccf
commit
23cfbcc35e
|
@ -13,11 +13,12 @@
|
||||||
|
|
||||||
#pragma GCC diagnostic ignored "-Wtype-limits"
|
#pragma GCC diagnostic ignored "-Wtype-limits"
|
||||||
|
|
||||||
#define info(t) \
|
#define info(t) \
|
||||||
printf("%s → %zu bits%s\n", STRINGIFY(t), \
|
printf("%s → %zu bits%s, %zu byte alignment\n", STRINGIFY(t), \
|
||||||
sizeof(t)*CHAR_BIT, \
|
sizeof(t)*CHAR_BIT, \
|
||||||
strstr(STRINGIFY(t), "signed") ? "" : \
|
strstr(STRINGIFY(t), "signed") ? "" : \
|
||||||
((t)-1 < (t)0 ? ", signed" : ", unsigned"));
|
(t)-1 < (t)0 ? ", signed" : ", unsigned", \
|
||||||
|
__alignof__(t))
|
||||||
|
|
||||||
enum Enum {
|
enum Enum {
|
||||||
enum_value,
|
enum_value,
|
||||||
|
|
Loading…
Reference in a new issue