summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
Diffstat (limited to 'lib')
-rw-r--r--lib/ccan/cast/cast.h6
1 files changed, 3 insertions, 3 deletions
diff --git a/lib/ccan/cast/cast.h b/lib/ccan/cast/cast.h
index 9f3ecdb717..b108b0c864 100644
--- a/lib/ccan/cast/cast.h
+++ b/lib/ccan/cast/cast.h
@@ -106,11 +106,11 @@
)
#define cast_const_strip1(expr) \
- __typeof__(*(struct { int z; __typeof__(expr) x; }){0}.x)
+ __typeof__(*(union { int z; __typeof__(expr) x; }){0}.x)
#define cast_const_strip2(expr) \
- __typeof__(**(struct { int z; __typeof__(expr) x; }){0}.x)
+ __typeof__(**(union { int z; __typeof__(expr) x; }){0}.x)
#define cast_const_strip3(expr) \
- __typeof__(***(struct { int z; __typeof__(expr) x; }){0}.x)
+ __typeof__(***(union { int z; __typeof__(expr) x; }){0}.x)
#define cast_const_compat1(expr, type) \
__builtin_types_compatible_p(cast_const_strip1(expr), \
cast_const_strip1(type))