diff mbox

[testsuite] : Fix some mingw testcases in gcc.dg

Message ID CAEwic4bPWvDS6rs8gVoxFGo-UwKv8-p75+erHy3d+SFa-sbYQg@mail.gmail.com
State New
Headers show

Commit Message

Kai Tietz March 17, 2014, 8:41 p.m. UTC
Hello,

this patch fixes some regressions introduced by default-option
-fms-extensions for mingw-targets.

ChangeLog

2014-03-17  Kai Tietz  <ktietz@redhat.com>

    * anon-struct-1.c: Add -fno-ms-extensions option for mingw targets.
    * anon-struct-11.c: Likewise.
    * anon-struct-2.c: Likewise.
    * c11-anon-struct-2.c: Likewise.
    * c11-anon-struct-3.c: Likewise.

Tested for i686-w64-mingw32, and x86_64-unknown-linux-gnu.  Ok for apply?

Regards,
Kai

Comments

Rainer Orth March 17, 2014, 8:50 p.m. UTC | #1
Hi Kai,

> this patch fixes some regressions introduced by default-option
> -fms-extensions for mingw-targets.

you should state in your submissions *which* regressions were
introduced/*which* problem you are fixing.  While this may be obvious to
you, it's often not so to reviewers.

> ChangeLog
>
> 2014-03-17  Kai Tietz  <ktietz@redhat.com>
>
>     * anon-struct-1.c: Add -fno-ms-extensions option for mingw targets.
>     * anon-struct-11.c: Likewise.
>     * anon-struct-2.c: Likewise.
>     * c11-anon-struct-2.c: Likewise.
>     * c11-anon-struct-3.c: Likewise.

gcc.dg/ prefix missing in ChangeLog entries.

> Tested for i686-w64-mingw32, and x86_64-unknown-linux-gnu.  Ok for apply?

Ok with that change.

	Rainer
Kai Tietz March 17, 2014, 8:54 p.m. UTC | #2
2014-03-17 21:50 GMT+01:00 Rainer Orth <ro@cebitec.uni-bielefeld.de>:
> Hi Kai,
>
>> this patch fixes some regressions introduced by default-option
>> -fms-extensions for mingw-targets.
>
> you should state in your submissions *which* regressions were
> introduced/*which* problem you are fixing.  While this may be obvious to
> you, it's often not so to reviewers.

I did.  "The regressions in testsuite are introduced by turning on the
state of -fms-extensions."  That all, and not more to tell.

>> ChangeLog
>>
>> 2014-03-17  Kai Tietz  <ktietz@redhat.com>
>>
>>     * anon-struct-1.c: Add -fno-ms-extensions option for mingw targets.
>>     * anon-struct-11.c: Likewise.
>>     * anon-struct-2.c: Likewise.
>>     * c11-anon-struct-2.c: Likewise.
>>     * c11-anon-struct-3.c: Likewise.
>
> gcc.dg/ prefix missing in ChangeLog entries.
>
>> Tested for i686-w64-mingw32, and x86_64-unknown-linux-gnu.  Ok for apply?
>
> Ok with that change.
>
>         Rainer
>
> --
> -----------------------------------------------------------------------------
> Rainer Orth, Center for Biotechnology, Bielefeld University
Rainer Orth March 17, 2014, 9:27 p.m. UTC | #3
Kai Tietz <ktietz70@googlemail.com> writes:

> 2014-03-17 21:50 GMT+01:00 Rainer Orth <ro@cebitec.uni-bielefeld.de>:
>> Hi Kai,
>>
>>> this patch fixes some regressions introduced by default-option
>>> -fms-extensions for mingw-targets.
>>
>> you should state in your submissions *which* regressions were
>> introduced/*which* problem you are fixing.  While this may be obvious to
>> you, it's often not so to reviewers.
>
> I did.  "The regressions in testsuite are introduced by turning on the
> state of -fms-extensions."  That all, and not more to tell.

You didn't.  *Which* regressions?  What happens?  I had to infer it from
a comment in one of the changed testcases:

 /* In strict ISO C mode, we don't recognize the anonymous struct/union
    extension or any Microsoft extensions.  */

If you'd cited the compiler error you get for one of the testcases,
everything had been clear.

	Rainer
diff mbox

Patch

Index: anon-struct-1.c
===================================================================
--- anon-struct-1.c    (Revision 208594)
+++ anon-struct-1.c    (Arbeitskopie)
@@ -1,4 +1,5 @@ 
 /* { dg-options "-std=iso9899:1990 -pedantic" } */
+/* { dg-additional-options "-fno-ms-extensions" { target *-*-mingw* } } */
 /* In strict ISO C mode, we don't recognize the anonymous struct/union
    extension or any Microsoft extensions.  */

Index: anon-struct-11.c
===================================================================
--- anon-struct-11.c    (Revision 208594)
+++ anon-struct-11.c    (Arbeitskopie)
@@ -3,6 +3,7 @@ 
 /* No special options--in particular, turn off the default
    -pedantic-errors option.  */
 /* { dg-options "" } */
+/* { dg-additional-options "-fno-ms-extensions" { target *-*-mingw* } } */

 /* When not using -fplan9-extensions, we don't support automatic
    conversion of pointer types, and we don't support referring to a
Index: anon-struct-2.c
===================================================================
--- anon-struct-2.c    (Revision 208594)
+++ anon-struct-2.c    (Arbeitskopie)
@@ -1,4 +1,5 @@ 
 /* { dg-options "-std=gnu89" } */
+/* { dg-additional-options "-fno-ms-extensions" { target *-*-mingw* } } */
 /* In GNU C mode, we recognize the anonymous struct/union extension,
    but not Microsoft extensions.  */

Index: c11-anon-struct-2.c
===================================================================
--- c11-anon-struct-2.c    (Revision 208594)
+++ c11-anon-struct-2.c    (Arbeitskopie)
@@ -2,6 +2,7 @@ 
    cases.  */
 /* { dg-do compile } */
 /* { dg-options "-std=c11 -pedantic-errors" } */
+/* { dg-additional-options "-fno-ms-extensions" { target *-*-mingw* } } */

 typedef struct s0
 {
Index: c11-anon-struct-3.c
===================================================================
--- c11-anon-struct-3.c    (Revision 208594)
+++ c11-anon-struct-3.c    (Arbeitskopie)
@@ -2,6 +2,7 @@ 
    cases: typedefs disallowed by N1549.  */
 /* { dg-do compile } */
 /* { dg-options "-std=c11 -pedantic-errors" } */
+/* { dg-additional-options "-fno-ms-extensions" { target *-*-mingw* } } */

 typedef struct
 {