mirror of
https://github.com/systemd/systemd-stable.git
synced 2024-12-23 17:34:00 +03:00
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"
|
||||
|
||||
#define info(t) \
|
||||
printf("%s → %zu bits%s\n", STRINGIFY(t), \
|
||||
sizeof(t)*CHAR_BIT, \
|
||||
strstr(STRINGIFY(t), "signed") ? "" : \
|
||||
((t)-1 < (t)0 ? ", signed" : ", unsigned"));
|
||||
#define info(t) \
|
||||
printf("%s → %zu bits%s, %zu byte alignment\n", STRINGIFY(t), \
|
||||
sizeof(t)*CHAR_BIT, \
|
||||
strstr(STRINGIFY(t), "signed") ? "" : \
|
||||
(t)-1 < (t)0 ? ", signed" : ", unsigned", \
|
||||
__alignof__(t))
|
||||
|
||||
enum Enum {
|
||||
enum_value,
|
||||
|
Loading…
Reference in New Issue
Block a user