diff mbox

Fix c/69522, memory management issue in c-parser

Message ID 20160212132612.GK3163@redhat.com
State New
Headers show

Commit Message

Marek Polacek Feb. 12, 2016, 1:26 p.m. UTC
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.


	Marek

Comments

Bernd Schmidt Feb. 12, 2016, 1:28 p.m. UTC | #1
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
Marek Polacek Feb. 12, 2016, 1:45 p.m. UTC | #2
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 mbox

Patch

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;