Add testcase to ensure that #pragma GCC diagnostic push/pop works with -Wtraditional

2017-05-18  Eric Gallager  <egall@gwmail.gwu.edu>

	* gcc.dg/pragma-diag-7.c: New test.

From-SVN: r248253
This commit is contained in:
Eric Gallager 2017-05-18 18:55:33 +00:00 committed by David Malcolm
parent d300615539
commit 4287da829c
2 changed files with 13 additions and 0 deletions

View File

@ -1,3 +1,7 @@
2017-05-18 Eric Gallager <egall@gwmail.gwu.edu>
* gcc.dg/pragma-diag-7.c: New test.
2017-05-18 Uros Bizjak <ubizjak@gmail.com>
PR target/80799

View File

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