diff options
Diffstat (limited to 'field.c')
-rw-r--r-- | field.c | 15 |
1 files changed, 8 insertions, 7 deletions
@@ -832,18 +832,19 @@ NODE ** get_field(long requested, Func_ptr *assign) { bool in_middle = false; + static bool warned = false; + extern int currule; + + if (do_lint && currule == END && ! warned) { + warned = true; + lintwarn(_("accessing fields from an END rule may not be portable")); + } + /* * if requesting whole line but some other field has been altered, * then the whole line must be rebuilt */ if (requested == 0) { - static bool warned = false; - extern int currule; - - if (do_lint && currule == END && ! warned) { - warned = true; - lintwarn(_("accessing $0 from an END rule may not be portable")); - } if (! field0_valid) { /* first, parse remainder of input record */ if (NF == -1) { |