aboutsummaryrefslogtreecommitdiff
path: root/gcc/testsuite/gcc.dg/pr77520.c
diff options
context:
space:
mode:
Diffstat (limited to 'gcc/testsuite/gcc.dg/pr77520.c')
-rw-r--r--gcc/testsuite/gcc.dg/pr77520.c10
1 files changed, 10 insertions, 0 deletions
diff --git a/gcc/testsuite/gcc.dg/pr77520.c b/gcc/testsuite/gcc.dg/pr77520.c
new file mode 100644
index 00000000000..b237639fb20
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/pr77520.c
@@ -0,0 +1,10 @@
+/* PR c/77520 - wrong value for extended ASCII characters in -Wformat message
+ Verify that characters in the extended ASCII range are quoted and not
+ allowed to be printed raw. */
+/* { dg-do compile } */
+/* { dg-options "-Wformat" } */
+
+void f (void)
+{
+ __builtin_printf ("%\x80"); /* { dg-warning "unknown conversion type character .\\\\x80. in format" } */
+}