public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
* [New file] Add testcase to ensure that #pragma GCC diagnostic push/pop works with -Wtraditional.
@ 2017-03-24 18:46 Eric Gallager
  2017-03-24 19:28 ` David Malcolm
  0 siblings, 1 reply; 7+ messages in thread
From: Eric Gallager @ 2017-03-24 18:46 UTC (permalink / raw)
  To: gcc-patches

[-- Attachment #1: Type: text/plain, Size: 540 bytes --]

The attached test case failed with gcc 4.9 and older, but started
compiling successfully with only the 1 expected warning with gcc 5.
Adding it to the test suite would ensure that this behavior doesn't
regress. Note that I have only tested it by compiling it manually, and
not by actually running it as part of the entire test suite, so please
let me know if I got any of the dejagnu directives wrong.

Thanks,
Eric Gallager

gcc/testsuite/ChangeLog:

2017-03-24  Eric Gallager  <egall@gwmail.gwu.edu>

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

[-- Attachment #2: pragma-diag-7.c --]
[-- Type: text/x-csrc, Size: 329 bytes --]

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

^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2017-05-18 18:56 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-03-24 18:46 [New file] Add testcase to ensure that #pragma GCC diagnostic push/pop works with -Wtraditional Eric Gallager
2017-03-24 19:28 ` David Malcolm
2017-03-24 20:49   ` Eric Gallager
2017-03-26  9:54     ` Martin Sebor
2017-05-14  1:03       ` [PING] " Eric Gallager
2017-05-02 17:06     ` [New file, Ping] " Eric Gallager
2017-05-18 19:05       ` David Malcolm

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).