It still gave a warning on gcc, because casting a char to a char* gives a warning. Not so on sun CC.
int main(int argc, char *argv[])
{
int main(int argc, char *argv[])
{
- c = cast_static(char, x);
+ c = cast_static(long, x);
(void) c; /* Suppress unused-but-set-variable warning. */
return 0;
}
(void) c; /* Suppress unused-but-set-variable warning. */
return 0;
}
+
+#ifdef FAIL
+#if !HAVE_COMPOUND_LITERALS
+#error "Unfortunately we don't fail if cast_static without compound literals"
+#endif
+#endif