summaryrefslogtreecommitdiff
path: root/interpret.h
diff options
context:
space:
mode:
authorArnold D. Robbins <arnold@skeeve.com>2020-05-06 20:55:07 +0300
committerArnold D. Robbins <arnold@skeeve.com>2020-05-06 20:55:07 +0300
commit1b79c13f8aa4c93ea727b1d42b30f3838faeaedf (patch)
tree97ee08fd0c99777fb1e9a78ca8a3a6bd3e017e94 /interpret.h
parent2a1b7457e8c878650352cf4925872c59d07a5fa2 (diff)
downloadgawk-1b79c13f8aa4c93ea727b1d42b30f3838faeaedf.tar.gz
Add lint check for string + string.
Diffstat (limited to 'interpret.h')
-rw-r--r--interpret.h9
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: