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" } */