Patch [3.4/3.3] G++ delete spurious semi-colons outside functions

Kaveh R. Ghazi ghazi@caip.rutgers.edu
Thu Apr 3 05:37:00 GMT 2003


Patch fixes:

>    4 ISO C does not allow extra `;' outside of a function

Tested on solaris2.7, no regressions.

Ok for mainline and 3.3?



2003-04-01  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>

	* operators.def (DEF_SIMPLE_OPERATOR, DEF_ASSN_OPERATOR,
	DEF_ASSN_OPERATOR): delete spurious semi-colon.
	* rtti.c (dfs_class_hint_mark): Likewise.

diff -rup orig/egcc-CVS20030331/gcc/cp/operators.def egcc-CVS20030331/gcc/cp/operators.def
--- orig/egcc-CVS20030331/gcc/cp/operators.def	2003-02-04 07:00:38.000000000 -0500
+++ egcc-CVS20030331/gcc/cp/operators.def	2003-04-01 17:46:09.164940000 -0500
@@ -131,7 +131,7 @@ DEF_SIMPLE_OPERATOR ("--", POSTDECREMENT
 DEF_SIMPLE_OPERATOR ("<?", MIN_EXPR, "v23min", 2)
 DEF_SIMPLE_OPERATOR (">?", MAX_EXPR, "v23max", 2)
 /* This one is needed for mangling.  */
-DEF_SIMPLE_OPERATOR ("::", SCOPE_REF, "sr", 2);
+DEF_SIMPLE_OPERATOR ("::", SCOPE_REF, "sr", 2)
 
 /* Assignment operators.  */
 DEF_ASSN_OPERATOR ("=", NOP_EXPR, "aS", 2)
@@ -146,8 +146,8 @@ DEF_ASSN_OPERATOR ("^=", BIT_XOR_EXPR, "
 DEF_ASSN_OPERATOR ("<<=", LSHIFT_EXPR, "lS", 2)
 DEF_ASSN_OPERATOR (">>=", RSHIFT_EXPR, "rS", 2)
 /* These operators are GNU extensions.  */
-DEF_ASSN_OPERATOR ("<?=", MIN_EXPR, "v23miN", 2);
-DEF_ASSN_OPERATOR (">?=", MAX_EXPR, "v23maX", 2);
+DEF_ASSN_OPERATOR ("<?=", MIN_EXPR, "v23miN", 2)
+DEF_ASSN_OPERATOR (">?=", MAX_EXPR, "v23maX", 2)
 
 /* Ternary operators.  */
 DEF_SIMPLE_OPERATOR ("?:", COND_EXPR, "qu", 3)
diff -rup orig/egcc-CVS20030331/gcc/cp/rtti.c egcc-CVS20030331/gcc/cp/rtti.c
--- orig/egcc-CVS20030331/gcc/cp/rtti.c	2003-03-20 21:31:37.000000000 -0500
+++ egcc-CVS20030331/gcc/cp/rtti.c	2003-04-01 17:46:24.773763000 -0500
@@ -922,7 +922,7 @@ dfs_class_hint_mark (tree binfo, void *d
       SET_CLASSTYPE_MARKED (basetype);
     }
   return NULL_TREE;
-};
+}
 
 /* Clear the base's dfs marks, after searching for duplicate bases.  */
 



More information about the Gcc-patches mailing list