summaryrefslogtreecommitdiffstats
path: root/gcc/java
diff options
context:
space:
mode:
authortromey <tromey@138bc75d-0d04-0410-961f-82ee72b054a4>2002-06-13 16:46:01 +0000
committertromey <tromey@138bc75d-0d04-0410-961f-82ee72b054a4>2002-06-13 16:46:01 +0000
commitafdadc656cdbc5e6a04f1830cb72ec876c17d642 (patch)
tree38dce2e69496c92ef7bb906ed3210d8a1a44147e /gcc/java
parent47b7d6d17f4ba16c003b381f353eb81d9a7d74fe (diff)
downloadppe42-gcc-afdadc656cdbc5e6a04f1830cb72ec876c17d642.tar.gz
ppe42-gcc-afdadc656cdbc5e6a04f1830cb72ec876c17d642.zip
2002-06-13 Akim Demaille <akim@epita.fr>
* parse.y (class_declaration, interface_declaration): Make sure all their rules have an action, in order to avoid meaningless `$$ = $1' and their type clashes. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@54592 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/java')
-rw-r--r--gcc/java/ChangeLog6
-rw-r--r--gcc/java/parse.y18
2 files changed, 18 insertions, 6 deletions
diff --git a/gcc/java/ChangeLog b/gcc/java/ChangeLog
index 3037f8cbc7d..cfc62d01572 100644
--- a/gcc/java/ChangeLog
+++ b/gcc/java/ChangeLog
@@ -1,3 +1,9 @@
+2002-06-13 Akim Demaille <akim@epita.fr>
+
+ * parse.y (class_declaration, interface_declaration): Make sure
+ all their rules have an action, in order to avoid meaningless `$$
+ = $1' and their type clashes.
+
2002-06-11 Tom Tromey <tromey@redhat.com>
* jcf-write.c (generate_classfile): Use FIELD_SYNTHETIC.
diff --git a/gcc/java/parse.y b/gcc/java/parse.y
index 907ca285808..7f373846aab 100644
--- a/gcc/java/parse.y
+++ b/gcc/java/parse.y
@@ -579,7 +579,7 @@ static GTY(()) tree src_parse_roots[1];
anonymous_class_creation trap_overflow_corner_case
%type <node> return_statement break_statement continue_statement
-%type <operator> ASSIGN_TK MULT_ASSIGN_TK DIV_ASSIGN_TK
+%type <operator> ASSIGN_TK MULT_ASSIGN_TK DIV_ASSIGN_TK
%type <operator> REM_ASSIGN_TK PLUS_ASSIGN_TK MINUS_ASSIGN_TK
%type <operator> LS_ASSIGN_TK SRS_ASSIGN_TK ZRS_ASSIGN_TK
%type <operator> AND_ASSIGN_TK XOR_ASSIGN_TK OR_ASSIGN_TK
@@ -846,20 +846,22 @@ class_declaration:
modifiers CLASS_TK identifier super interfaces
{ create_class ($1, $3, $4, $5); }
class_body
+ {;}
| CLASS_TK identifier super interfaces
{ create_class (0, $2, $3, $4); }
class_body
+ {;}
| modifiers CLASS_TK error
- {yyerror ("Missing class name"); RECOVER;}
+ { yyerror ("Missing class name"); RECOVER; }
| CLASS_TK error
- {yyerror ("Missing class name"); RECOVER;}
+ { yyerror ("Missing class name"); RECOVER; }
| CLASS_TK identifier error
{
if (!ctxp->class_err) yyerror ("'{' expected");
DRECOVER(class1);
}
| modifiers CLASS_TK identifier error
- {if (!ctxp->class_err) yyerror ("'{' expected"); RECOVER;}
+ { if (!ctxp->class_err) yyerror ("'{' expected"); RECOVER; }
;
super:
@@ -1279,19 +1281,23 @@ interface_declaration:
INTERFACE_TK identifier
{ create_interface (0, $2, NULL_TREE); }
interface_body
+ { ; }
| modifiers INTERFACE_TK identifier
{ create_interface ($1, $3, NULL_TREE); }
interface_body
+ { ; }
| INTERFACE_TK identifier extends_interfaces
{ create_interface (0, $2, $3); }
interface_body
+ { ; }
| modifiers INTERFACE_TK identifier extends_interfaces
{ create_interface ($1, $3, $4); }
interface_body
+ { ; }
| INTERFACE_TK identifier error
- {yyerror ("'{' expected"); RECOVER;}
+ { yyerror ("'{' expected"); RECOVER; }
| modifiers INTERFACE_TK identifier error
- {yyerror ("'{' expected"); RECOVER;}
+ { yyerror ("'{' expected"); RECOVER; }
;
extends_interfaces:
OpenPOWER on IntegriCloud