]> git.ozlabs.org Git - ccan/blobdiff - ccan/cast/cast.h
list.h: opaque list iteration functionality
[ccan] / ccan / cast / cast.h
index d54209170d73de84343e3dfb6609a17da982737a..b108b0c864d3b0cd07e26a497040537921d674b4 100644 (file)
@@ -1,4 +1,4 @@
-/* Licensed under LGPLv3+ - see LICENSE file for details */
+/* Licensed under LGPLv2.1+ - see LICENSE file for details */
 #ifndef CCAN_CAST_H
 #define CCAN_CAST_H
 #include "config.h"
          )
 
 #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))