aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rwxr-xr-xChangeLog10
-rw-r--r--awkgram.c2
-rw-r--r--awkgram.y2
-rw-r--r--node.c2
4 files changed, 13 insertions, 3 deletions
diff --git a/ChangeLog b/ChangeLog
index 2b9be8a3..31d3d7a0 100755
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,7 +1,13 @@
+2018-08-02 Arnold D. Robbins <arnold@skeeve.com>
+
+ * awkgram.y (yylex): Add lint warning upon encountering escaped
+ physical newlines in a string.
+ * node.c (make_str_node): Ditto.
+
2018-08-01 John E. Malmberg <wb8tyw@qsl.net>
- * custom.h: Include fp.h on OpenVMS.
- Workaround for bug in math.h missing some declarations.
+ * custom.h: Include fp.h on OpenVMS.
+ Workaround for bug in math.h missing some declarations.
2018-07-31 Arnold D. Robbins <arnold@skeeve.com>
diff --git a/awkgram.c b/awkgram.c
index 10c55fa4..3abb2e16 100644
--- a/awkgram.c
+++ b/awkgram.c
@@ -6274,6 +6274,8 @@ retry:
if (c == '\n') {
if (do_posix)
fatal(_("POSIX does not allow physical newlines in string values"));
+ else if (do_lint)
+ lintwarn(_("backslash string continuation is not portable"));
sourceline++;
continue;
}
diff --git a/awkgram.y b/awkgram.y
index f3d3b38b..995b8bda 100644
--- a/awkgram.y
+++ b/awkgram.y
@@ -3854,6 +3854,8 @@ retry:
if (c == '\n') {
if (do_posix)
fatal(_("POSIX does not allow physical newlines in string values"));
+ else if (do_lint)
+ lintwarn(_("backslash string continuation is not portable"));
sourceline++;
continue;
}
diff --git a/node.c b/node.c
index 4ad41ef1..2f9e6d4c 100644
--- a/node.c
+++ b/node.c
@@ -450,7 +450,7 @@ make_str_node(const char *s, size_t len, int flags)
c = parse_escape(&pf);
if (c < 0) {
if (do_lint)
- lintwarn(_("backslash at end of string"));
+ lintwarn(_("backslash string continuation is not portable"));
if ((flags & ELIDE_BACK_NL) != 0)
continue;
c = '\\';