From: Zbigniew Jędrzejewski-Szmek Date: Tue, 5 Feb 2019 17:56:41 +0000 (+0100) Subject: test-sizeof: print the alignments too X-Git-Tag: v241~22^2 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=23cfbcc35eda8150c653b549ae48c3ead0888279;p=platform%2Fupstream%2Fsystemd.git test-sizeof: print the alignments too --- diff --git a/src/test/test-sizeof.c b/src/test/test-sizeof.c index 7a1e496..35b0876 100644 --- a/src/test/test-sizeof.c +++ b/src/test/test-sizeof.c @@ -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,