projects
/
platform
/
upstream
/
systemd.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
3c7ddda
)
test-sizeof: print the alignments too
author
Zbigniew Jędrzejewski-Szmek
<zbyszek@in.waw.pl>
Tue, 5 Feb 2019 17:56:41 +0000
(18:56 +0100)
committer
Zbigniew Jędrzejewski-Szmek
<zbyszek@in.waw.pl>
Tue, 5 Feb 2019 17:56:41 +0000
(18:56 +0100)
src/test/test-sizeof.c
patch
|
blob
|
history
diff --git
a/src/test/test-sizeof.c
b/src/test/test-sizeof.c
index
7a1e496
..
35b0876
100644
(file)
--- 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,