summaryrefslogtreecommitdiff
path: root/awkgram.c
diff options
context:
space:
mode:
authorArnold D. Robbins <arnold@skeeve.com>2012-10-03 10:23:15 +0200
committerArnold D. Robbins <arnold@skeeve.com>2012-10-03 10:23:15 +0200
commit3d9b832439afeb1b05c60831e0865df585dc55ac (patch)
treea0796f2b6a97ceb6c257cad516b62083aacb55da /awkgram.c
parent9e2703f7ca0b35129a94465654d0e18d14048dbc (diff)
downloadgawk-3d9b832439afeb1b05c60831e0865df585dc55ac.tar.gz
More SYMTAB and FUNCTAB improvements.
Diffstat (limited to 'awkgram.c')
-rw-r--r--awkgram.c16
1 files changed, 12 insertions, 4 deletions
diff --git a/awkgram.c b/awkgram.c
index 0c51a284..6e819802 100644
--- a/awkgram.c
+++ b/awkgram.c
@@ -2990,8 +2990,12 @@ regular_print:
(yyvsp[(2) - (4)])->opcode = Op_push_array;
(yyvsp[(2) - (4)])->memory = variable((yyvsp[(2) - (4)])->source_line, arr, Node_var_new);
- if ((yyvsp[(2) - (4)])->memory == symbol_table)
- fatal(_("`delete' is not allowed with SYMTAB"));
+ if (! do_posix && ! do_traditional) {
+ if ((yyvsp[(2) - (4)])->memory == symbol_table)
+ fatal(_("`delete' is not allowed with SYMTAB"));
+ else if ((yyvsp[(2) - (4)])->memory == func_table)
+ fatal(_("`delete' is not allowed with FUNCTAB"));
+ }
if ((yyvsp[(4) - (4)]) == NULL) {
/*
@@ -3035,8 +3039,12 @@ regular_print:
(yyvsp[(1) - (4)])->expr_count = 0;
(yyval) = list_append(list_create((yyvsp[(3) - (4)])), (yyvsp[(1) - (4)]));
- if ((yyvsp[(3) - (4)])->memory == symbol_table)
- fatal(_("`delete' is not allowed with SYMTAB"));
+ if (! do_posix && ! do_traditional) {
+ if ((yyvsp[(3) - (4)])->memory == symbol_table)
+ fatal(_("`delete' is not allowed with SYMTAB"));
+ else if ((yyvsp[(3) - (4)])->memory == func_table)
+ fatal(_("`delete' is not allowed with FUNCTAB"));
+ }
}
break;