chiark
/
gitweb
/
~ianmdlvl
/
elogind.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
25acc5a
)
test-sizeof: print the size of an enum
author
Zbigniew Jędrzejewski-Szmek
<zbyszek@in.waw.pl>
Wed, 26 Apr 2017 01:14:59 +0000
(21:14 -0400)
committer
Sven Eden
<yamakuzure@gmx.net>
Tue, 25 Jul 2017 07:46:52 +0000
(09:46 +0200)
src/test/test-sizeof.c
patch
|
blob
|
history
diff --git
a/src/test/test-sizeof.c
b/src/test/test-sizeof.c
index 36389b7710b4589e42ff79519cb65f17ed740cac..269adfd18fe8bac5b6f8b44b415d41465166d1d3 100644
(file)
--- a/
src/test/test-sizeof.c
+++ b/
src/test/test-sizeof.c
@@
-32,6
+32,14
@@
strstr(STRINGIFY(t), "signed") ? "" : \
((t)-1 < (t)0 ? ", signed" : ", unsigned"));
+enum Enum {
+ enum_value,
+};
+
+enum BigEnum {
+ big_enum_value = UINT64_C(-1),
+};
+
int main(void) {
info(char);
info(signed char);
@@
-53,5
+61,8
@@
int main(void) {
info(usec_t);
info(__time_t);
+ info(enum Enum);
+ info(enum BigEnum);
+
return 0;
}