Commit 04466541 by Joseph Myers Committed by Joseph Myers

c90-restrict-1.c, [...]: Adjust expected messages for new parser.

	* gcc.dg/c90-restrict-1.c, gcc.dg/c99-arraydecl-2.c,
	gcc.dg/c99-func-2.c, gcc.dg/charset/asm2.c, gcc.dg/concat.c,
	gcc.dg/cpp/19990413-1.c, gcc.dg/cpp/paste4.c,
	gcc.dg/init-desig-obs-1.c, gcc.dg/noncompile/920721-2.c,
	gcc.dg/noncompile/930622-2.c, gcc.dg/noncompile/940112-1.c,
	gcc.dg/noncompile/950921-1.c, gcc.dg/switch-2.c,
	objc.dg/naming-1.m, objc.dg/naming-2.m: Adjust expected messages
	for new parser.

From-SVN: r90064
parent 4e5813dd
2004-11-04 Joseph S. Myers <joseph@codesourcery.com>
* gcc.dg/c90-restrict-1.c, gcc.dg/c99-arraydecl-2.c,
gcc.dg/c99-func-2.c, gcc.dg/charset/asm2.c, gcc.dg/concat.c,
gcc.dg/cpp/19990413-1.c, gcc.dg/cpp/paste4.c,
gcc.dg/init-desig-obs-1.c, gcc.dg/noncompile/920721-2.c,
gcc.dg/noncompile/930622-2.c, gcc.dg/noncompile/940112-1.c,
gcc.dg/noncompile/950921-1.c, gcc.dg/switch-2.c,
objc.dg/naming-1.m, objc.dg/naming-2.m: Adjust expected messages
for new parser.
2004-11-04 Richard Sandiford <rsandifo@redhat.com> 2004-11-04 Richard Sandiford <rsandifo@redhat.com>
PR target/15342 PR target/15342
......
...@@ -4,4 +4,4 @@ ...@@ -4,4 +4,4 @@
/* { dg-options "-std=iso9899:1990 -pedantic-errors" } */ /* { dg-options "-std=iso9899:1990 -pedantic-errors" } */
char *restrict foo; /* { dg-bogus "warning" "warning in place of error" } */ char *restrict foo; /* { dg-bogus "warning" "warning in place of error" } */
/* { dg-error "(parse|syntax) error|no type" "restrict not in C90" { target *-*-* } 6 } */ /* { dg-error "parse error|syntax error|expected|no type" "restrict not in C90" { target *-*-* } 6 } */
...@@ -7,10 +7,10 @@ ...@@ -7,10 +7,10 @@
void void
foo (void) foo (void)
{ {
int a[2, 3]; /* { dg-error "parse|syntax" "bad array declarator" } */ int a[2, 3]; /* { dg-error "parse|syntax|expected" "bad array declarator" } */
void b(int x[2, 3]); /* { dg-error "parse|syntax" "bad array declarator" } */ void b(int x[2, 3]); /* { dg-error "parse|syntax|expected" "bad array declarator" } */
void c(int [2, 3]); /* { dg-error "parse|syntax" "bad array declarator" } */ void c(int [2, 3]); /* { dg-error "parse|syntax|expected" "bad array declarator" } */
void d(int *x[restrict 2, 3]); /* { dg-error "parse|syntax" "bad array declarator" } */ void d(int *x[restrict 2, 3]); /* { dg-error "parse|syntax|expected" "bad array declarator" } */
void e(int *x[static restrict 2, 3]); /* { dg-error "parse|syntax" "bad array declarator" } */ void e(int *x[static restrict 2, 3]); /* { dg-error "parse|syntax|expected" "bad array declarator" } */
void f(int *x[restrict static 2, 3]); /* { dg-error "parse|syntax" "bad array declarator" } */ void f(int *x[restrict static 2, 3]); /* { dg-error "parse|syntax|expected" "bad array declarator" } */
} }
...@@ -6,5 +6,5 @@ ...@@ -6,5 +6,5 @@
void void
foo (void) foo (void)
{ {
__func__ "foo"; /* { dg-error "(parse|syntax) error" "before string constant" } */ __func__ "foo"; /* { dg-error "parse error|syntax error|expected" "before string constant" } */
} }
...@@ -3,13 +3,13 @@ ...@@ -3,13 +3,13 @@
the string "foobar" should be translated. */ the string "foobar" should be translated. */
/* { dg-do compile } */ /* { dg-do compile } */
/* { dg-require-iconv "IBM-1047" } */ /* { dg-require-iconv "IBM-1047" } */
asm (not_a_string); /* { dg-error "(parse|syntax) error before" "not_a_string" } */ asm (not_a_string); /* { dg-error "(parse error|syntax error|expected string literal) before" "not_a_string" } */
char x[] = "foobar"; char x[] = "foobar";
void foo (void) void foo (void)
{ {
char *y; char *y;
asm (not_a_string2); /* { dg-error "(parse|syntax) error before" "not_a_string" } */ asm (not_a_string2); /* { dg-error "(parse error|syntax error|expected string literal) before" "not_a_string" } */
#define FOO "walrus" #define FOO "walrus"
y = FOO; y = FOO;
......
...@@ -8,9 +8,9 @@ ...@@ -8,9 +8,9 @@
void foo () void foo ()
{ {
char s1[] = __FUNCTION__"."; /* { dg-error "(parse|syntax|invalid)" } */ char s1[] = __FUNCTION__"."; /* { dg-error "(parse|syntax|expected|invalid)" } */
char s2[] = __PRETTY_FUNCTION__".";/* { dg-error "(parse|syntax|invalid)" } */ char s2[] = __PRETTY_FUNCTION__".";/* { dg-error "(parse|syntax|expected|invalid)" } */
char s3[] = "."__FUNCTION__; /* { dg-error "(parse|syntax|invalid)" } */ char s3[] = "."__FUNCTION__; /* { dg-error "(parse|syntax|expected|invalid)" } */
char s4[] = "."__PRETTY_FUNCTION__;/* { dg-error "(parse|syntax|invalid)" } */ char s4[] = "."__PRETTY_FUNCTION__;/* { dg-error "(parse|syntax|expected|invalid)" } */
char s5[] = ".""."; /* No error. */ char s5[] = ".""."; /* No error. */
} }
...@@ -9,5 +9,5 @@ func(void) ...@@ -9,5 +9,5 @@ func(void)
{ {
FOO(i FOO(i
= 4) = 4)
else; /* { dg-error "(parse|syntax) error" "error on this line" { target *-*-* } { 12 } } */ else; /* { dg-error "parse error|syntax error|expected" "error on this line" { target *-*-* } { 12 } } */
} }
...@@ -11,6 +11,6 @@ ...@@ -11,6 +11,6 @@
int main () int main ()
{ {
double d = glue (1.0e, +1); /* { dg-error "exponent|(parse|syntax) error" } */ double d = glue (1.0e, +1); /* { dg-error "exponent|parse error|syntax error|expected" } */
return 0; return 0;
} }
...@@ -12,8 +12,8 @@ int x0[] = { [0] = 1 }; ...@@ -12,8 +12,8 @@ int x0[] = { [0] = 1 };
int x1[] = { [0] 1 }; int x1[] = { [0] 1 };
/* Invalid syntax: multiple designators without "=". */ /* Invalid syntax: multiple designators without "=". */
int x2[2][2] = { [0][0] 1 }; /* { dg-error "(syntax|parse) error" } */ int x2[2][2] = { [0][0] 1 }; /* { dg-error "syntax error|parse error|expected" } */
/* Invalid syntax: C99-style structure designator without "=". */ /* Invalid syntax: C99-style structure designator without "=". */
struct s s2 = { .a 1 }; /* { dg-error "(syntax|parse) error" } */ struct s s2 = { .a 1 }; /* { dg-error "syntax error|parse error|expected" } */
...@@ -2,5 +2,5 @@ void f(int n) ...@@ -2,5 +2,5 @@ void f(int n)
{ {
int s; int s;
for(s=0;s<n;s++) for(s=0;s<n;s++)
s==5?1 n=1; /* { dg-error "(parse|syntax) error" } */ s==5?1 n=1; /* { dg-error "parse error|syntax error|expected" } */
} }
f () f ()
{ {
int i; int i;
for (i--) /* { dg-error "parse|syntax" } */ for (i--) /* { dg-error "parse|syntax|expected" } */
; ;
} }
...@@ -4,4 +4,4 @@ f (int x) ...@@ -4,4 +4,4 @@ f (int x)
double e = 1; double e = 1;
e = 1; e = 1;
return (e) return (e)
} /* { dg-error "(parse|syntax) error" } */ } /* { dg-error "parse error|syntax error|expected" } */
typedef enum typedef enum
{ {
a = (X) 0, /* { dg-error "undeclared|not integer|(parse|syntax) error" } */ a = (X) 0, /* { dg-error "undeclared|not integer|parse error|syntax error|expected" } */
b b
} c; } c;
typedef enum typedef enum
{ {
d = (X) 0 /* { dg-error "undeclared|not integer|(parse|syntax) error" } */ d = (X) 0 /* { dg-error "undeclared|not integer|parse error|syntax error|expected" } */
} e; } e;
...@@ -7,4 +7,4 @@ int foo(int i) ...@@ -7,4 +7,4 @@ int foo(int i)
switch (i) switch (i)
case 3: case 3:
return 1, return 1,
} /* { dg-error "(parse|syntax) error" } */ } /* { dg-error "parse error|syntax error|expected" } */
...@@ -15,5 +15,5 @@ void foo(void) ...@@ -15,5 +15,5 @@ void foo(void)
void bar(void) void bar(void)
{ {
View *view; /* ok */ View *view; /* ok */
View = 1; /* { dg-error "(parse|syntax) error" } */ View = 1; /* { dg-error "parse error|syntax error|expected" } */
} }
...@@ -4,7 +4,7 @@ ...@@ -4,7 +4,7 @@
@interface Foo @interface Foo
@end @end
float Foo; /* { dg-error "(parse|syntax) error" } */ float Foo; /* { dg-error "parse error|syntax error|expected" } */
double Bar; double Bar;
@interface Bar @interface Bar
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment