+/* Casts POINTER to TYPE. Yields a compiler diagnostic if either TYPE or
+ POINTER is not a pointer to character type.
+
+ PSPP uses "unsigned char" (actually uint8_t) in "union value" and "char"
+ elsewhere to emphasize that data in union value usually requires reencoding
+ when transferred to and from other string types. These macros suppress the
+ warning when implicitly converting between pointers to different character
+ types, so their use normally marks a bug that should eventually be fixed.
+ However, until these bugs are fixed, suppressing the warnings is much less
+ annoying.
+
+ Use CHAR_CAST_BUG if you think there is a bug to be fixed, or if you have
+ not yet carefully examined the situation, or if you are not sure.
+ Use CHAR_CAST if you are convinced that this is actually a correct cast. */
+#define CHAR_CAST(TYPE, POINTER) \
+ ((void) verify_expr (sizeof (*(POINTER)) == 1, 1), \
+ (void) (sizeof (*(POINTER) + 1)), \
+ (void) verify_expr (sizeof (*(TYPE) NULL) == 1, 1), \
+ (void) (sizeof (*(TYPE) NULL + 1)), \
+ (TYPE) (POINTER))
+#define CHAR_CAST_BUG(TYPE, POINTER) CHAR_CAST(TYPE, POINTER)
+