diff options
Diffstat (limited to 'awkgram.y')
-rw-r--r-- | awkgram.y | 7 |
1 files changed, 7 insertions, 0 deletions
@@ -47,7 +47,9 @@ static int install_function(char *fname, INSTRUCTION *fi, INSTRUCTION *plist); static NODE *mk_rexp(INSTRUCTION *exp); static void param_sanity(INSTRUCTION *arglist); static int parms_shadow(INSTRUCTION *pc, int *shadow); +#ifndef NO_LINT static int isnoeffect(OPCODE type); +#endif static INSTRUCTION *make_assignable(INSTRUCTION *ip); static void dumpintlstr(const char *str, size_t len); static void dumpintlstr2(const char *str1, size_t len1, const char *str2, size_t len2); @@ -4514,6 +4516,7 @@ mk_rexp(INSTRUCTION *list) return ip->memory; } +#ifndef NO_LINT /* isnoeffect --- when used as a statement, has no side effects */ static int @@ -4556,6 +4559,8 @@ isnoeffect(OPCODE type) return false; } +#endif /* NO_LINT */ + /* make_assignable --- make this operand an assignable one if posiible */ @@ -5354,8 +5359,10 @@ add_lint(INSTRUCTION *list, LINTTYPE linttype) ; if (do_lint) { /* compile-time warning */ +#ifndef NO_LINT if (isnoeffect(ip->opcode)) lintwarn_ln(ip->source_line, ("statement may have no effect")); +#endif } if (ip->opcode == Op_push) { /* run-time warning */ |