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]

[PATCH]: Front-end updates


I'm commiting this patch. It fixes a typo, enhance error
handling/recovery with parameter declarations and provides a
reasonable fix to an old Anthony's bug report and patch:

  http://gcc.gnu.org/ml/gcc-patches/2000-01/msg00263.html

./A

2000-01-29  Alexandre Petit-Bianco  <apbianco@cygnus.com>

	* parse.y (formal_parameter:): Set `$$' to NULL_TREE for better
	error handling/recovery.
	* java-tree.h (SYNCHRONIZED_EXPR): Fixed typo in comment.

Wed Jan 12 20:20:11 2000  Alexandre Petit-Bianco  <apbianco@cygnus.com>

	* jcf-write.c (generate_bytecode_insns): binop: Change the type of
	the shift value to int. Fixed typo in comment.

Index: parse.y
===================================================================
RCS file: /cvs/gcc/egcs/gcc/java/parse.y,v
retrieving revision 1.133
diff -u -p -r1.133 parse.y
--- parse.y	2000/01/25 18:29:02	1.133
+++ parse.y	2000/01/29 22:00:59
@@ -971,10 +971,14 @@ formal_parameter:
 		  $$ = build_tree_list ($3, $2);
 		}
 |	type error
-		{yyerror ("Missing identifier"); RECOVER;}
+		{
+		  yyerror ("Missing identifier"); RECOVER;
+		  $$ = NULL_TREE;
+		}
 |	final type error
 		{
 		  yyerror ("Missing identifier"); RECOVER;
+		  $$ = NULL_TREE;
 		}
 ;
 
Index: java-tree.def
===================================================================
RCS file: /cvs/gcc/egcs/gcc/java/java-tree.def,v
retrieving revision 1.10
diff -u -p -r1.10 java-tree.def
--- java-tree.def	1999/02/19 12:32:41	1.10
+++ java-tree.def	2000/01/29 22:00:59
@@ -51,7 +51,7 @@ DEFTREECODE (TRY_EXPR, "try-catch-finall
 DEFTREECODE (CATCH_EXPR, "catch", '1', 1)
 
 /* Synchronized statement.
-   Operand 0 is the expression on which we whish to synchronize,
+   Operand 0 is the expression on which we wish to synchronize,
    Operand 1 is the synchronized expression block.  */
 DEFTREECODE (SYNCHRONIZED_EXPR, "synchronized", 'e', 2)
 
Index: jcf-write.c
===================================================================
RCS file: /cvs/gcc/egcs/gcc/java/jcf-write.c,v
retrieving revision 1.44
diff -u -p -r1.44 jcf-write.c
--- jcf-write.c	2000/01/21 20:57:00	1.44
+++ jcf-write.c	2000/01/29 22:01:06
@@ -2086,11 +2086,13 @@ generate_bytecode_insns (exp, target, st
       else
 	{
 	  generate_bytecode_insns (arg0, target, state);
+	  if (jopcode >= OPCODE_lshl && jopcode <= OPCODE_lushr)
+	    arg1 = convert (int_type_node, arg1);
 	  generate_bytecode_insns (arg1, target, state);
 	}
       /* For most binary operations, both operands and the result have the
 	 same type.  Shift operations are different.  Using arg1's type
-	 gets us the correct SP adjustment in all casesd. */
+	 gets us the correct SP adjustment in all cases. */
       if (target == STACK_TARGET)
 	emit_binop (jopcode, TREE_TYPE (arg1), state);
       break;

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