diff options
author | Arnold D. Robbins <arnold@skeeve.com> | 2018-09-26 16:26:59 +0300 |
---|---|---|
committer | Arnold D. Robbins <arnold@skeeve.com> | 2018-09-26 16:26:59 +0300 |
commit | 8c5752ed884408c41609d3ae471c04afaf1fb40a (patch) | |
tree | 5bbb708d0f3c53bbe5fe184fb6978be28b1e4413 /awk.h | |
parent | 49136c983c3d4ab53f144f2989dee60a67745300 (diff) | |
parent | c25c88f583c984112055fa091d357c1b8538d5d8 (diff) | |
download | egawk-8c5752ed884408c41609d3ae471c04afaf1fb40a.tar.gz egawk-8c5752ed884408c41609d3ae471c04afaf1fb40a.tar.bz2 egawk-8c5752ed884408c41609d3ae471c04afaf1fb40a.zip |
Merge branch 'gawk-4.2-stable'
Diffstat (limited to 'awk.h')
-rw-r--r-- | awk.h | 8 |
1 files changed, 7 insertions, 1 deletions
@@ -1761,9 +1761,15 @@ extern uintmax_t adjust_uint(uintmax_t n); /* POP_ARRAY --- get the array at the top of the stack */ static inline NODE * -POP_ARRAY() +POP_ARRAY(bool check_for_untyped) { NODE *t = POP(); + static bool warned = false; + + if (do_lint && ! warned && check_for_untyped && t->type == Node_var_new) { + warned = true; + lintwarn(_("behavior of `for' loop on untyped variable is not defined by POSIX")); + } return (t->type == Node_var_array) ? t : force_array(t, true); } |