From 26e1f724a63da8748c3dc73a8ad3769382f9905c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Zbigniew=20J=C4=99drzejewski-Szmek?= Date: Tue, 25 Apr 2017 21:14:59 -0400 Subject: [PATCH] test-sizeof: print the size of an enum --- src/test/test-sizeof.c | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/src/test/test-sizeof.c b/src/test/test-sizeof.c index 36389b7710b..269adfd18fe 100644 --- 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; }