gcc.dg/cpp/direct2.c, gcc.dg/cpp/direct2s.c,
gcc.dg/cpp/separate-1.c, gcc.dg/noncompile/951123-1.c,
gcc.dg/noncompile/971104-1.c, gcc.dg/noncompile/990416-1.c: Adjust
expected messages for new parser.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@90128
138bc75d-0d04-0410-961f-
82ee72b054a4
+2004-11-05 Joseph S. Myers <joseph@codesourcery.com>
+
+ * gcc.dg/20040910-1.c, gcc.dg/cpp/digraph2.c,
+ gcc.dg/cpp/direct2.c, gcc.dg/cpp/direct2s.c,
+ gcc.dg/cpp/separate-1.c, gcc.dg/noncompile/951123-1.c,
+ gcc.dg/noncompile/971104-1.c, gcc.dg/noncompile/990416-1.c: Adjust
+ expected messages for new parser.
+
2004-11-04 Mark Mitchell <mark@codesourcery.com>
* testsuite/g++.dg/ext/visibility/symbian1.C: New test.
/* Tests error recovery for invalid code. */
-__attribute__((foo) int f (){} /* { dg-error "(parse|syntax) error before 'int'" } */
+__attribute__((foo) int f (){} /* { dg-error "(parse error|syntax error|expected '\\)') before 'int'" } */
int main (int argc, char *argv[])
{
return 0;
-%> /* { dg-error "(parse|syntax) error" } */
+%> /* { dg-error "parse error|syntax error|expected" } */
/* Place this after main () so we get to test both the compiler above
and the preprocessor below. */
HASH include "somerandomfile" /*{ dg-error "stray" "non-include" }*/
/*{ dg-bogus "No such" "don't execute non-include" { target *-*-* } 13 }*/
-int resync_parser_1; /*{ dg-error "parse|syntax" "" }*/
+int resync_parser_1; /*{ dg-error "parse|syntax|expected" "" }*/
-HASHINCLUDE <somerandomfile> /*{ dg-error "stray" "non-include 2" }*/
+HASHINCLUDE <somerandomfile> /*{ dg-error "stray|expected" "non-include 2" }*/
/*{ dg-bogus "No such" "don't execute non-include 2" { target *-*-* } 17 }*/
int resync_parser_2;
void g1 ()
{
-HASH define X 1 /* { dg-error "stray|undeclared|parse|syntax|for each" "# from macro" } */
+HASH define X 1 /* { dg-error "stray|undeclared|parse|syntax|expected|for each" "# from macro" } */
int resync_parser_3;
}
void g2 ()
{
-HASHDEFINE Y 1 /* { dg-error "stray|undeclared|parse|syntax|for each" "#define from macro" } */
+HASHDEFINE Y 1 /* { dg-error "stray|undeclared|parse|syntax|expected|for each" "#define from macro" } */
int resync_parser_4;
}
#define slashstar /##*
#define starslash *##/
-slashstar starslash /* { dg-error "(parse|syntax) error" "not a comment" } */
+slashstar starslash /* { dg-error "parse error|syntax error|expected" "not a comment" } */
/* { dg-warning "does not give" "paste warning(s)" { target *-*-* } 45 } */
HASH include "somerandomfile" /*{ dg-error "stray" "non-include" }*/
/*{ dg-bogus "No such" "don't execute non-include" { target *-*-* } 15 }*/
-int resync_parser_1; /*{ dg-error "parse|syntax" "" }*/
+int resync_parser_1; /*{ dg-error "parse|syntax|expected" "" }*/
-HASHINCLUDE <somerandomfile> /*{ dg-error "stray" "non-include 2" }*/
+HASHINCLUDE <somerandomfile> /*{ dg-error "stray|expected" "non-include 2" }*/
/*{ dg-bogus "No such" "don't execute non-include 2" { target *-*-* } 18 }*/
int resync_parser_2;
void g1 ()
{
-HASH define X 1 /* { dg-error "stray|undeclared|parse|syntax|for each" "# from macro" } */
+HASH define X 1 /* { dg-error "stray|undeclared|parse|syntax|expected|for each" "# from macro" } */
int resync_parser_3;
}
void g2 ()
{
-HASHDEFINE Y 1 /* { dg-error "stray|undeclared|parse|syntax|for each" "#define from macro" } */
+HASHDEFINE Y 1 /* { dg-error "stray|undeclared|parse|syntax|expected|for each" "#define from macro" } */
int resync_parser_4;
}
#define FOO()
-int FOO( /* { dg-error "(parse|syntax) error" "error on this line" } */
+int FOO( /* { dg-error "parse error|syntax error|expected" "error on this line" } */
), bar;
-int baz FOO /* { dg-error "(parse|syntax) error" "error on this line" } */
+int baz FOO /* { dg-error "parse error|syntax error|expected" "error on this line" } */
; /* { dg-warning "no type or storage class" "warning on this line" } */
struct S { int a; int b[2]; };
-struct S x = { 0, [0]; }; /* { dg-error "array index|near|(parse|syntax)" } */
+struct S x = { 0, [0]; }; /* { dg-error "array index|near|parse|syntax|expected" } */
printf("%s had processes sleeping on it!\n",
({ "MUTEX ", "BARB_SEM 1", "BARB_SEM 2", "CUST_SEM 1",
"CUST_SEM 2", "WAIT_SEM 1", "WAIT_SEM 2", "WAIT_SEM 3",
- "WAIT_SEM 4"} /* { dg-error "(parse|syntax) error" } */
+ "WAIT_SEM 4"} /* { dg-error "parse error|syntax error|expected" } */
[( sb.sem_num )]) );
}
typedef int word_type;
static void
-copy_reg (unsigned int reg, frame_state *udata, /* { dg-error "parse|syntax" } */
+copy_reg (unsigned int reg, frame_state *udata, /* { dg-error "parse|syntax|expected" } */
frame_state *target_udata)
{
word_type *preg = get_reg_addr (reg, udata, 0); /* { dg-error "undeclared|function|without a cast" } */