diff options
author | Arnold D. Robbins <arnold@skeeve.com> | 2020-05-06 20:55:07 +0300 |
---|---|---|
committer | Arnold D. Robbins <arnold@skeeve.com> | 2020-05-06 20:55:07 +0300 |
commit | 1b79c13f8aa4c93ea727b1d42b30f3838faeaedf (patch) | |
tree | 97ee08fd0c99777fb1e9a78ca8a3a6bd3e017e94 /interpret.h | |
parent | 2a1b7457e8c878650352cf4925872c59d07a5fa2 (diff) | |
download | egawk-1b79c13f8aa4c93ea727b1d42b30f3838faeaedf.tar.gz egawk-1b79c13f8aa4c93ea727b1d42b30f3838faeaedf.tar.bz2 egawk-1b79c13f8aa4c93ea727b1d42b30f3838faeaedf.zip |
Add lint check for string + string.
Diffstat (limited to 'interpret.h')
-rw-r--r-- | interpret.h | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/interpret.h b/interpret.h index 80ef4689..6137e8e0 100644 --- a/interpret.h +++ b/interpret.h @@ -412,6 +412,15 @@ uninitialized_scalar: } break; + case Op_lint_plus: + // no need to check do_lint, this opcode won't + // be generated if that's not true + t1 = TOP(); + t2 = PEEK(1); + if ((t1->flags & STRING) != 0 && (t2->flags & STRING) != 0) + lintwarn(_("operator `+' used on two string values")); + break; + case Op_K_break: case Op_K_continue: case Op_jmp: |