summaryrefslogtreecommitdiff
path: root/gcc/testsuite/gcc.dg/pragma-diag-2.c
diff options
context:
space:
mode:
Diffstat (limited to 'gcc/testsuite/gcc.dg/pragma-diag-2.c')
-rw-r--r--gcc/testsuite/gcc.dg/pragma-diag-2.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/gcc/testsuite/gcc.dg/pragma-diag-2.c b/gcc/testsuite/gcc.dg/pragma-diag-2.c
new file mode 100644
index 000000000..588d61895
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/pragma-diag-2.c
@@ -0,0 +1,9 @@
+/* { dg-do compile } */
+/* { dg-options "-std=c89 -pedantic -Wno-long-long" } */
+/* { dg-message "warnings being treated as errors" "" { target *-*-* } 0 } */
+
+int i = 0LL;
+
+#pragma GCC diagnostic error "-Wlong-long"
+
+int j = 1LL; /* { dg-error "long long" } */