diff options
author | Maria Matejka <mq@ucw.cz> | 2023-10-04 19:57:55 +0200 |
---|---|---|
committer | Maria Matejka <mq@ucw.cz> | 2023-10-04 19:57:55 +0200 |
commit | d41b06238dc2167f8e470aa2fb31cb937ff8fb3e (patch) | |
tree | 4805f4d3695fb49604285e67c747f57bfc0f8adb | |
parent | 6a242b3ec66f2ab89f9277e67125eab3e3676644 (diff) |
Filter: explicitly forbidden for-loop with pre-defined variable
-rw-r--r-- | filter/config.Y | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/filter/config.Y b/filter/config.Y index cf25d874..3cd8e3e4 100644 --- a/filter/config.Y +++ b/filter/config.Y @@ -974,7 +974,7 @@ var: for_var: type symbol { $$ = cf_define_symbol(new_config, $2, SYM_VARIABLE | $1, offset, f_new_var(sym_->scope)); } - | CF_SYM_KNOWN { $$ = $1; cf_assert_symbol($1, SYM_VARIABLE); } + | CF_SYM_KNOWN { cf_error("Use of a pre-defined variable in for loop is not allowed"); } ; cmd: |