This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[C testsuite] Bison-1.875 tweaks


Hi!

The below implements Richard Henderson's suggestion:
test for "(parse|syntax) error".

Regtested on i686-pc-linux-gnu (bison-1.875).

Ok for mainline?

Paolo.
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.
diff -urN testsuite-orig/gcc.dg/c90-restrict-1.c testsuite/gcc.dg/c90-restrict-1.c
--- testsuite-orig/gcc.dg/c90-restrict-1.c	2000-07-17 10:25:51.000000000 +0200
+++ testsuite/gcc.dg/c90-restrict-1.c	2003-01-25 14:07:02.000000000 +0100
@@ -4,4 +4,4 @@
 /* { dg-options "-std=iso9899:1990 -pedantic-errors" } */
 
 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 } */
diff -urN testsuite-orig/gcc.dg/c99-func-2.c testsuite/gcc.dg/c99-func-2.c
--- testsuite-orig/gcc.dg/c99-func-2.c	2001-04-24 10:22:06.000000000 +0200
+++ testsuite/gcc.dg/c99-func-2.c	2003-01-25 13:56:22.000000000 +0100
@@ -6,5 +6,5 @@
 void
 foo (void)
 {
-  __func__ "foo"; /* { dg-error "parse error" "before string constant" } */
+  __func__ "foo"; /* { dg-error "(parse|syntax) error" "before string constant" } */
 }
diff -urN testsuite-orig/gcc.dg/cpp/19990413-1.c testsuite/gcc.dg/cpp/19990413-1.c
--- testsuite-orig/gcc.dg/cpp/19990413-1.c	2000-06-28 00:26:11.000000000 +0200
+++ testsuite/gcc.dg/cpp/19990413-1.c	2003-01-25 13:49:01.000000000 +0100
@@ -9,5 +9,5 @@
 {
   FOO(i
       = 4)
-  else;  /* { dg-error "parse error" "error on this line" { target *-*-* } { 12 } } */ 
+  else;  /* { dg-error "(parse|syntax) error" "error on this line" { target *-*-* } { 12 } } */ 
 }
diff -urN testsuite-orig/gcc.dg/cpp/digraph2.c testsuite/gcc.dg/cpp/digraph2.c
--- testsuite-orig/gcc.dg/cpp/digraph2.c	2000-07-13 12:12:08.000000000 +0200
+++ testsuite/gcc.dg/cpp/digraph2.c	2003-01-25 13:49:39.000000000 +0100
@@ -9,7 +9,7 @@
 int main (int argc, char *argv[])
 {
   return 0;
-%>				/* { dg-error "parse error" } */
+%>				/* { dg-error "(parse|syntax) error" } */
 
 /* Place this after main () so we get to test both the compiler above
    and the preprocessor below.  */
diff -urN testsuite-orig/gcc.dg/cpp/direct2.c testsuite/gcc.dg/cpp/direct2.c
--- testsuite-orig/gcc.dg/cpp/direct2.c	2001-05-10 02:07:23.000000000 +0200
+++ testsuite/gcc.dg/cpp/direct2.c	2003-01-25 13:50:31.000000000 +0100
@@ -33,5 +33,5 @@
 #define slashstar /##*
 #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 } */
diff -urN testsuite-orig/gcc.dg/cpp/paste4.c testsuite/gcc.dg/cpp/paste4.c
--- testsuite-orig/gcc.dg/cpp/paste4.c	2002-06-02 21:37:34.000000000 +0200
+++ testsuite/gcc.dg/cpp/paste4.c	2003-01-25 13:51:51.000000000 +0100
@@ -11,6 +11,6 @@
 
 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;
 }
diff -urN testsuite-orig/gcc.dg/noncompile/920721-2.c testsuite/gcc.dg/noncompile/920721-2.c
--- testsuite-orig/gcc.dg/noncompile/920721-2.c	2002-02-07 10:08:24.000000000 +0100
+++ testsuite/gcc.dg/noncompile/920721-2.c	2003-01-25 13:57:17.000000000 +0100
@@ -2,5 +2,5 @@
 {
 int 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" } */
 }
diff -urN testsuite-orig/gcc.dg/noncompile/930622-2.c testsuite/gcc.dg/noncompile/930622-2.c
--- testsuite-orig/gcc.dg/noncompile/930622-2.c	2000-08-25 02:58:27.000000000 +0200
+++ testsuite/gcc.dg/noncompile/930622-2.c	2003-01-25 13:57:54.000000000 +0100
@@ -1,6 +1,6 @@
 f ()
 {
   int i;
-  for (i--)	/* { dg-error "parse" } */
+  for (i--)	/* { dg-error "parse|syntax" } */
     ;
 }
diff -urN testsuite-orig/gcc.dg/noncompile/940112-1.c testsuite/gcc.dg/noncompile/940112-1.c
--- testsuite-orig/gcc.dg/noncompile/940112-1.c	2000-06-29 21:55:26.000000000 +0200
+++ testsuite/gcc.dg/noncompile/940112-1.c	2003-01-25 13:58:16.000000000 +0100
@@ -4,4 +4,4 @@
   double e = 1;
   e = 1;
   return (e)
-}	/* { dg-error "parse error" } */
+}	/* { dg-error "(parse|syntax) error" } */
diff -urN testsuite-orig/gcc.dg/noncompile/950921-1.c testsuite/gcc.dg/noncompile/950921-1.c
--- testsuite-orig/gcc.dg/noncompile/950921-1.c	2000-06-29 21:55:26.000000000 +0200
+++ testsuite/gcc.dg/noncompile/950921-1.c	2003-01-25 13:58:57.000000000 +0100
@@ -1,10 +1,10 @@
 typedef enum
 {
-  a = (X) 0,	/* { dg-error "undeclared|not integer|parse error" } */
+  a = (X) 0,	/* { dg-error "undeclared|not integer|(parse|syntax) error" } */
   b
 } c;
 
 typedef enum
 {
-  d = (X) 0	/* { dg-error "undeclared|not integer|parse error" } */
+  d = (X) 0	/* { dg-error "undeclared|not integer|(parse|syntax) error" } */
 } e;
diff -urN testsuite-orig/gcc.dg/noncompile/951123-1.c testsuite/gcc.dg/noncompile/951123-1.c
--- testsuite-orig/gcc.dg/noncompile/951123-1.c	2000-06-29 21:55:26.000000000 +0200
+++ testsuite/gcc.dg/noncompile/951123-1.c	2003-01-25 13:59:33.000000000 +0100
@@ -1,2 +1,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)" } */
diff -urN testsuite-orig/gcc.dg/noncompile/971104-1.c testsuite/gcc.dg/noncompile/971104-1.c
--- testsuite-orig/gcc.dg/noncompile/971104-1.c	2000-06-29 21:55:26.000000000 +0200
+++ testsuite/gcc.dg/noncompile/971104-1.c	2003-01-25 14:00:12.000000000 +0100
@@ -23,6 +23,6 @@
     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 error" } */
+       "WAIT_SEM 4"}	 /* { dg-error "(parse|syntax) error" } */
 	[( sb.sem_num )]) );
 }
diff -urN testsuite-orig/gcc.dg/noncompile/990416-1.c testsuite/gcc.dg/noncompile/990416-1.c
--- testsuite-orig/gcc.dg/noncompile/990416-1.c	2000-07-31 20:19:28.000000000 +0200
+++ testsuite/gcc.dg/noncompile/990416-1.c	2003-01-25 14:00:41.000000000 +0100
@@ -1,7 +1,7 @@
 typedef int word_type;
    
 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)
 {  
   word_type *preg = get_reg_addr (reg, udata, 0);	/* { dg-error "undeclared|function|without a cast" } */

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]