From: Eric Gallager Date: Thu, 18 May 2017 18:55:33 +0000 (+0000) Subject: Add testcase to ensure that #pragma GCC diagnostic push/pop works with -Wtraditional X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=4287da829c9697c58131666447bf8f707bd8b635;p=gcc.git Add testcase to ensure that #pragma GCC diagnostic push/pop works with -Wtraditional 2017-05-18 Eric Gallager * gcc.dg/pragma-diag-7.c: New test. From-SVN: r248253 --- diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog index 60299f2c8c1..0ea8444d590 100644 --- a/gcc/testsuite/ChangeLog +++ b/gcc/testsuite/ChangeLog @@ -1,3 +1,7 @@ +2017-05-18 Eric Gallager + + * gcc.dg/pragma-diag-7.c: New test. + 2017-05-18 Uros Bizjak PR target/80799 diff --git a/gcc/testsuite/gcc.dg/pragma-diag-7.c b/gcc/testsuite/gcc.dg/pragma-diag-7.c new file mode 100644 index 00000000000..402ee56839a --- /dev/null +++ b/gcc/testsuite/gcc.dg/pragma-diag-7.c @@ -0,0 +1,9 @@ +/* { dg-do compile } */ + +unsigned long ok = 0UL; +#pragma GCC diagnostic push +#pragma GCC diagnostic warning "-Wtraditional" +unsigned long bad = 1UL; /* { dg-warning "suffix" } */ +/* Note the extra space before the pragma on this next line: */ + #pragma GCC diagnostic pop +unsigned long ok_again = 2UL; /* { dg-bogus "suffix" } */