summaryrefslogtreecommitdiff
path: root/parse.y
diff options
context:
space:
mode:
Diffstat (limited to 'parse.y')
-rw-r--r--parse.y6
1 files changed, 5 insertions, 1 deletions
diff --git a/parse.y b/parse.y
index 771199c..791345d 100644
--- a/parse.y
+++ b/parse.y
@@ -1573,7 +1573,11 @@ f_args : f_arg ',' f_optarg ',' f_rest_arg opt_f_block_arg
$$ = NEW_ARGS(0, 0, -1);
}
-f_norm_arg : tIDENTIFIER
+f_norm_arg : tCONSTANT
+ {
+ yyerror("formal argument must not be constant");
+ }
+ | tIDENTIFIER
{
if (!is_local_id($1))
yyerror("formal argument must be local variable");