------- Comment #26 from manu at gcc dot gnu dot org 2007-03-13 00:29 -------
There are some tests that are using the wrong directive (or the test is
silently failing). Should I submit these as patches to gcc-patches?
Index: gcc/testsuite/gcc.dg/20050121-1.c
===================================================================
--- gcc/testsuite/gcc.dg/20050121-1.c (revision 122287)
+++ gcc/testsuite/gcc.dg/20050121-1.c (working copy)
@@ -3,7 +3,7 @@
/* { dg-do-compile } */
void foo()
{
return;
- break; /* { dg-warning "break statement not within" } */
+ break; /* { dg-error "break statement not within" } */
}
Index: gcc/testsuite/gcc.dg/940510-1.c
===================================================================
--- gcc/testsuite/gcc.dg/940510-1.c (revision 122287)
+++ gcc/testsuite/gcc.dg/940510-1.c (working copy)
@@ -1,3 +1,5 @@
/* { dg-do compile } */
/* { dg-options "-std=c89 -pedantic" } */
-struct { int a[]; } x = { 0 }; /* { dg-error "(flexible array member)|(near
initialization)" } */
+struct { int a[]; } x = { 0 }; /* { dg-warning "ISO C90 does not support
flexible array members" } */
+/* { dg-error "flexible array member in otherwise empty struct" "" { target
*-*-* } 3 } */
+
Index: gcc/testsuite/gcc.dg/charset/attribute2.c
===================================================================
--- gcc/testsuite/gcc.dg/charset/attribute2.c (revision 122287)
+++ gcc/testsuite/gcc.dg/charset/attribute2.c (working copy)
@@ -2,7 +2,7 @@
If error recovery is ever testable then "foobar" should be
translated. */
/* { dg-do compile }
{ dg-require-iconv "IBM1047" }
*/
-int foo __attribute__ ((walrus)); /* { dg-error "walrus" "ignored" } */
+int foo __attribute__ ((walrus)); /* { dg-warning "walrus" "ignored" } */
char x[] = "foobar";
Index: gcc/testsuite/gcc.dg/bitfld-1.c
===================================================================
--- gcc/testsuite/gcc.dg/bitfld-1.c (revision 122287)
+++ gcc/testsuite/gcc.dg/bitfld-1.c (working copy)
@@ -22,10 +22,10 @@ struct bf1
unsigned int : 5;
double e: 1; /* { dg-error "invalid type" } */
float f: 1; /* { dg-error "invalid type" } */
unsigned long g: 5; /* { dg-warning "GCC extension|ISO C" } */
ui h: 5;
- enum foo i: 2; /* { dg-error "narrower" } */
+ enum foo i: 2; /* { dg-warning "narrower" } */
/* { dg-warning "GCC extension|ISO C" "extension" { target *-*-* } 27 } */
enum foo j: 3; /* { dg-warning "GCC extension|ISO C" } */
unsigned int k: 256; /* { dg-error "exceeds its type" } */
};
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=25241