re GNATS gcj/128 (weak error message when expecting final modifier)
Mon Jan 17 11:58:17 2000 Joerg Brunsmann <joerg.brunsmann@fernuni-hagen.de> * parse.y (format_parameter:): Use final: rule instead of modifiers:. (final:): New rule. Joerg Brunsmann's contribution to fix the Java PR #128. From-SVN: r31477
This commit is contained in:
parent
a68ad5bdee
commit
18990de52b
2 changed files with 17 additions and 3 deletions
|
@ -1,3 +1,8 @@
|
|||
Mon Jan 17 11:58:17 2000 Joerg Brunsmann <joerg.brunsmann@fernuni-hagen.de>
|
||||
|
||||
* parse.y (format_parameter:): Use final: rule instead of modifiers:.
|
||||
(final:): New rule.
|
||||
|
||||
2000-01-17 Tom Tromey <tromey@cygnus.com>
|
||||
|
||||
* gjavah.c (print_field_info): Allow non-static final fields.
|
||||
|
|
|
@ -950,20 +950,29 @@ formal_parameter:
|
|||
{
|
||||
$$ = build_tree_list ($2, $1);
|
||||
}
|
||||
| modifiers type variable_declarator_id /* Added, JDK1.1 final parms */
|
||||
| final type variable_declarator_id /* Added, JDK1.1 final parms */
|
||||
{
|
||||
parse_jdk1_1_error ("final parameters");
|
||||
$$ = build_tree_list ($3, $2);
|
||||
}
|
||||
| type error
|
||||
{yyerror ("Missing identifier"); RECOVER;}
|
||||
| modifiers type error
|
||||
| final type error
|
||||
{
|
||||
SOURCE_FRONTEND_DEBUG (("Modifiers: %d", $1));
|
||||
yyerror ("Missing identifier"); RECOVER;
|
||||
}
|
||||
;
|
||||
|
||||
final:
|
||||
modifiers
|
||||
{
|
||||
check_modifiers ("Illegal modifier `%s'. Only `final' was expected here",
|
||||
$1, ACC_FINAL);
|
||||
if ($1 != ACC_FINAL)
|
||||
MODIFIER_WFL (FINAL_TK) = build_wfl_node (NULL_TREE);
|
||||
}
|
||||
;
|
||||
|
||||
throws:
|
||||
{ $$ = NULL_TREE; }
|
||||
| THROWS_TK class_type_list
|
||||
|
|
Loading…
Add table
Reference in a new issue