Commit 32d9a5bd by Paolo Carlini Committed by Paolo Carlini

Tweaks for Bison-1.875.

2003-01-25  Paolo Carlini  <pcarlini@unitus.it>

	Tweaks for Bison-1.875. From the NEWS file:
 	"- `parse error' -> `syntax error'
	Bison now uniformly uses the term `syntax error'"
	* gcc.dg/cpp/19990413-1.c: Test for "(parse|syntax) error".
	* gcc.dg/cpp/digraph2.c: Likewise.
	* gcc.dg/cpp/direct2.c: Likewise.
	* gcc.dg/cpp/paste4.c: Likewise.
	* gcc.dg/c90-restrict-1.c: Likewise.
	* gcc.dg/c99-func-2.c: Likewise.
	* gcc.dg/noncompile/920721-2.c: Likewise.
	* gcc.dg/noncompile/930622-2.c: Likewise.
	* gcc.dg/noncompile/940112-1.c: Likewise.
	* gcc.dg/noncompile/950921-1.c: Likewise.
	* gcc.dg/noncompile/951123-1.c: Likewise.
	* gcc.dg/noncompile/971104-1.c: Likewise.
	* gcc.dg/noncompile/990416-1.c: Likewise.

From-SVN: r61768
parent 27a6aa72
2003-01-25 Paolo Carlini <pcarlini@unitus.it>
Tweaks for Bison-1.875. From the NEWS file:
"- `parse error' -> `syntax error'
Bison now uniformly uses the term `syntax error'"
* gcc.dg/cpp/19990413-1.c: Test for "(parse|syntax) error".
* gcc.dg/cpp/digraph2.c: Likewise.
* gcc.dg/cpp/direct2.c: Likewise.
* gcc.dg/cpp/paste4.c: Likewise.
* gcc.dg/c90-restrict-1.c: Likewise.
* gcc.dg/c99-func-2.c: Likewise.
* gcc.dg/noncompile/920721-2.c: Likewise.
* gcc.dg/noncompile/930622-2.c: Likewise.
* gcc.dg/noncompile/940112-1.c: Likewise.
* gcc.dg/noncompile/950921-1.c: Likewise.
* gcc.dg/noncompile/951123-1.c: Likewise.
* gcc.dg/noncompile/971104-1.c: Likewise.
* gcc.dg/noncompile/990416-1.c: Likewise.
2003-01-24 Paolo Carlini <pcarlini@unitus.it> 2003-01-24 Paolo Carlini <pcarlini@unitus.it>
* g++.dg/parse/undefined1.C: Add error message. * g++.dg/parse/undefined1.C: Add error message.
......
...@@ -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 error|no type" "restrict not in C90" { target *-*-* } 6 } */ /* { dg-error "(parse|syntax) error|no type" "restrict not in C90" { target *-*-* } 6 } */
...@@ -6,5 +6,5 @@ ...@@ -6,5 +6,5 @@
void void
foo (void) foo (void)
{ {
__func__ "foo"; /* { dg-error "parse error" "before string constant" } */ __func__ "foo"; /* { dg-error "(parse|syntax) error" "before string constant" } */
} }
...@@ -9,5 +9,5 @@ func(void) ...@@ -9,5 +9,5 @@ func(void)
{ {
FOO(i FOO(i
= 4) = 4)
else; /* { dg-error "parse error" "error on this line" { target *-*-* } { 12 } } */ else; /* { dg-error "(parse|syntax) error" "error on this line" { target *-*-* } { 12 } } */
} }
...@@ -9,7 +9,7 @@ ...@@ -9,7 +9,7 @@
int main (int argc, char *argv[]) int main (int argc, char *argv[])
{ {
return 0; return 0;
%> /* { dg-error "parse error" } */ %> /* { dg-error "(parse|syntax) error" } */
/* Place this after main () so we get to test both the compiler above /* Place this after main () so we get to test both the compiler above
and the preprocessor below. */ and the preprocessor below. */
......
...@@ -33,5 +33,5 @@ void f () ...@@ -33,5 +33,5 @@ void f ()
#define slashstar /##* #define slashstar /##*
#define starslash *##/ #define starslash *##/
slashstar starslash /* { dg-error "parse error" "not a comment" } */ slashstar starslash /* { dg-error "(parse|syntax) error" "not a comment" } */
/* { dg-warning "does not give" "paste warning(s)" { target *-*-* } 36 } */ /* { dg-warning "does not give" "paste warning(s)" { target *-*-* } 36 } */
...@@ -11,6 +11,6 @@ ...@@ -11,6 +11,6 @@
int main () int main ()
{ {
double d = glue (1.0e, +1); /* { dg-error "exponent|parse error" } */ double d = glue (1.0e, +1); /* { dg-error "exponent|(parse|syntax) error" } */
return 0; return 0;
} }
...@@ -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 error" } */ s==5?1 n=1; /* { dg-error "(parse|syntax) error" } */
} }
f () f ()
{ {
int i; int i;
for (i--) /* { dg-error "parse" } */ for (i--) /* { dg-error "parse|syntax" } */
; ;
} }
...@@ -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 error" } */ } /* { dg-error "(parse|syntax) error" } */
typedef enum typedef enum
{ {
a = (X) 0, /* { dg-error "undeclared|not integer|parse error" } */ a = (X) 0, /* { dg-error "undeclared|not integer|(parse|syntax) error" } */
b b
} c; } c;
typedef enum typedef enum
{ {
d = (X) 0 /* { dg-error "undeclared|not integer|parse error" } */ d = (X) 0 /* { dg-error "undeclared|not integer|(parse|syntax) error" } */
} e; } e;
struct S { int a; int b[2]; }; struct S { int a; int b[2]; };
struct S x = { 0, [0]; }; /* { dg-error "array index|near|parse" } */ struct S x = { 0, [0]; }; /* { dg-error "array index|near|(parse|syntax)" } */
...@@ -23,6 +23,6 @@ static void up(int sem){ ...@@ -23,6 +23,6 @@ static void up(int sem){
printf("%s had processes sleeping on it!\n", printf("%s had processes sleeping on it!\n",
({ "MUTEX ", "BARB_SEM 1", "BARB_SEM 2", "CUST_SEM 1", ({ "MUTEX ", "BARB_SEM 1", "BARB_SEM 2", "CUST_SEM 1",
"CUST_SEM 2", "WAIT_SEM 1", "WAIT_SEM 2", "WAIT_SEM 3", "CUST_SEM 2", "WAIT_SEM 1", "WAIT_SEM 2", "WAIT_SEM 3",
"WAIT_SEM 4"} /* { dg-error "parse error" } */ "WAIT_SEM 4"} /* { dg-error "(parse|syntax) error" } */
[( sb.sem_num )]) ); [( sb.sem_num )]) );
} }
typedef int word_type; typedef int word_type;
static void static void
copy_reg (unsigned int reg, frame_state *udata, /* { dg-error "parse" } */ copy_reg (unsigned int reg, frame_state *udata, /* { dg-error "parse|syntax" } */
frame_state *target_udata) frame_state *target_udata)
{ {
word_type *preg = get_reg_addr (reg, udata, 0); /* { dg-error "undeclared|function|without a cast" } */ word_type *preg = get_reg_addr (reg, udata, 0); /* { dg-error "undeclared|function|without a cast" } */
......
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