public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug testsuite/53028] New: add dg-pedantic
@ 2012-04-18  9:19 manu at gcc dot gnu.org
  2012-04-18  9:23 ` [Bug testsuite/53028] " manu at gcc dot gnu.org
                   ` (10 more replies)
  0 siblings, 11 replies; 12+ messages in thread
From: manu at gcc dot gnu.org @ 2012-04-18  9:19 UTC (permalink / raw)
  To: gcc-bugs

http://gcc.gnu.org/bugzilla/show_bug.cgi?id=53028

             Bug #: 53028
           Summary: add dg-pedantic
    Classification: Unclassified
           Product: gcc
           Version: unknown
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: testsuite
        AssignedTo: unassigned@gcc.gnu.org
        ReportedBy: manu@gcc.gnu.org


It would be nice if the testsuite supported a new directive dg-pedantic, to be
used like:

 /* Test for case labels not integer constant expressions but folding
   to integer constants (used in Linux kernel, PR 39613, 52283).  */
 /* { dg-do compile } */
 /* { dg-options "" } */

extern unsigned int u;

void
b (int c)
{
  switch (c)
    {
    case (int) (2  | ((4 < 8) ? 8 : u)): /* { dg-pedantic "case label is not an
integer constant expression" } */
      ;
    }
}

Then, the testsuite will run this testcase two times, one with dg-options and
another with dg-options + -pedantic-errors. In the first case, it should
convert dg-pedantic to dg-bogus,  in the second case it should convert
dg-pedantic to dg-error. 

This feature will avoid a lot of duplicated testcases, and help to test
"-pedantic" much more thoroughly. Unfortunately, my DejaGNU skills are not
sharp enough to figure out this.


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

end of thread, other threads:[~2012-04-30  1:08 UTC | newest]

Thread overview: 12+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-04-18  9:19 [Bug testsuite/53028] New: add dg-pedantic manu at gcc dot gnu.org
2012-04-18  9:23 ` [Bug testsuite/53028] " manu at gcc dot gnu.org
2012-04-18 17:37 ` mikestump at comcast dot net
2012-04-18 18:28 ` manu at gcc dot gnu.org
2012-04-18 20:04 ` mikestump at comcast dot net
2012-04-18 21:48 ` manu at gcc dot gnu.org
2012-04-18 22:47 ` mikestump at comcast dot net
2012-04-19  7:06 ` manu at gcc dot gnu.org
2012-04-23 21:38 ` joseph at codesourcery dot com
2012-04-24  0:31 ` mikestump at comcast dot net
2012-04-28  0:03 ` manu at gcc dot gnu.org
2012-04-30  1:08 ` mikestump at comcast dot net

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).