+2000-09-24 Joseph S. Myers <jsm28@cam.ac.uk>
+
+ * c-common.c (check_format_info): Warn for a wide character string
+ used as a non-wide format argument.
+
2000-09-24 Joseph S. Myers <jsm28@cam.ac.uk>
* builtins.def (BUILT_IN_LLABS): Add.
status_warning (status, "format not a string literal, argument types not checked");
return;
}
+ if (TYPE_MAIN_VARIANT (TREE_TYPE (TREE_TYPE (format_tree))) != char_type_node)
+ {
+ status_warning (status, "format is a wide character string");
+ return;
+ }
format_chars = TREE_STRING_POINTER (format_tree);
format_length = TREE_STRING_LENGTH (format_tree);
if (format_length <= 1)
+2000-09-24 Joseph S. Myers <jsm28@cam.ac.uk>
+
+ * gcc.dg/c90-printf-1.c: Add test for wide string format.
+
2000-09-22 Geoff Keating <geoffk@cygnus.com>
* gcc.c-torture/compile/20000922-1.c: New file.
printf ("%"); /* { dg-warning "trailing" "trailing % warning" } */
printf ("%++d", i); /* { dg-warning "repeated" "repeated flag warning" } */
printf ("%n", cn); /* { dg-warning "constant" "%n with const" } */
+ printf ((const char *)L"foo"); /* { dg-warning "wide" "wide string" } */
/* Can we test for the warning for unterminated string formats? */
}