Message ID | 20160212132612.GK3163@redhat.com |
---|---|
State | New |
Headers | show |
On 02/12/2016 02:26 PM, Marek Polacek wrote: > On Fri, Feb 12, 2016 at 02:17:19PM +0100, Andreas Schwab wrote: >> FAIL: gcc.dg/pr69522.c (test for excess errors) >> Excess errors: >> /daten/aranym/gcc/gcc-20160212/gcc/testsuite/gcc.dg/pr69522.c:2:8: error: struct has no members [-Wpedantic] >> /daten/aranym/gcc/gcc-20160212/gcc/testsuite/gcc.dg/pr69522.c:9:8: error: ISO C forbids empty initializer braces [-Wpedantic] > > Bernd, ok to fix this with the following? > > 2016-02-12 Marek Polacek <polacek@redhat.com> > > * gcc.dg/pr69522.c: Add empty dg-options. What's causing the problem there, -Wpedantic? Maybe add the opposite rather than an empty dg-options? Either way's fine, sorry about the breakage - I thought I had the testcase applied during the test run, but apparently not. Bernd
On Fri, Feb 12, 2016 at 02:28:39PM +0100, Bernd Schmidt wrote: > On 02/12/2016 02:26 PM, Marek Polacek wrote: > >On Fri, Feb 12, 2016 at 02:17:19PM +0100, Andreas Schwab wrote: > >>FAIL: gcc.dg/pr69522.c (test for excess errors) > >>Excess errors: > >>/daten/aranym/gcc/gcc-20160212/gcc/testsuite/gcc.dg/pr69522.c:2:8: error: struct has no members [-Wpedantic] > >>/daten/aranym/gcc/gcc-20160212/gcc/testsuite/gcc.dg/pr69522.c:9:8: error: ISO C forbids empty initializer braces [-Wpedantic] > > > >Bernd, ok to fix this with the following? > > > >2016-02-12 Marek Polacek <polacek@redhat.com> > > > > * gcc.dg/pr69522.c: Add empty dg-options. > > What's causing the problem there, -Wpedantic? Maybe add the opposite rather > than an empty dg-options? Either way's fine, sorry about the breakage - I > thought I had the testcase applied during the test run, but apparently not. Without dg-options we test with -ansi (aka -std=c89) -pedantic-errors, hence the error. With empty dg-options we test without these two options. Empty dg-options are quite common in the testsuite. I'll go ahead with the patch. Marek
diff --git gcc/testsuite/gcc.dg/pr69522.c gcc/testsuite/gcc.dg/pr69522.c index 452a1ae..820168d 100644 --- gcc/testsuite/gcc.dg/pr69522.c +++ gcc/testsuite/gcc.dg/pr69522.c @@ -1,4 +1,5 @@ /* { dg-do compile } */ +/* { dg-options "" } */ struct str {}; struct { struct str b;