Module Name: src Committed By: rillig Date: Sun Feb 27 18:57:16 UTC 2022
Modified Files: src/tests/usr.bin/xlint/lint1: msg_219.c msg_219.exp Log Message: tests/lint: test where exactly lint complains about concatenation This only applies to traditional C and ensures that the behavior is preserved when rearranging the C parser to evaluate string concatenation from left to right. To generate a diff of this commit: cvs rdiff -u -r1.3 -r1.4 src/tests/usr.bin/xlint/lint1/msg_219.c \ src/tests/usr.bin/xlint/lint1/msg_219.exp Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
Modified files: Index: src/tests/usr.bin/xlint/lint1/msg_219.c diff -u src/tests/usr.bin/xlint/lint1/msg_219.c:1.3 src/tests/usr.bin/xlint/lint1/msg_219.c:1.4 --- src/tests/usr.bin/xlint/lint1/msg_219.c:1.3 Sun Jan 31 11:12:07 2021 +++ src/tests/usr.bin/xlint/lint1/msg_219.c Sun Feb 27 18:57:16 2022 @@ -1,4 +1,4 @@ -/* $NetBSD: msg_219.c,v 1.3 2021/01/31 11:12:07 rillig Exp $ */ +/* $NetBSD: msg_219.c,v 1.4 2022/02/27 18:57:16 rillig Exp $ */ # 3 "msg_219.c" @@ -10,3 +10,10 @@ char concat1[] = "one"; char concat2[] = "one" "two"; /* expect: 219 */ char concat3[] = "one" "two" "three"; /* expect: 219 */ char concat4[] = "one" "two" "three" "four"; /* expect: 219 */ + +char concat4lines[] = + "one" + /* expect+1: warning: concatenated strings are illegal in traditional C [219] */ + "two" + "three" + "four"; Index: src/tests/usr.bin/xlint/lint1/msg_219.exp diff -u src/tests/usr.bin/xlint/lint1/msg_219.exp:1.3 src/tests/usr.bin/xlint/lint1/msg_219.exp:1.4 --- src/tests/usr.bin/xlint/lint1/msg_219.exp:1.3 Sun Mar 28 15:36:37 2021 +++ src/tests/usr.bin/xlint/lint1/msg_219.exp Sun Feb 27 18:57:16 2022 @@ -1,3 +1,4 @@ msg_219.c(10): warning: concatenated strings are illegal in traditional C [219] msg_219.c(11): warning: concatenated strings are illegal in traditional C [219] msg_219.c(12): warning: concatenated strings are illegal in traditional C [219] +msg_219.c(17): warning: concatenated strings are illegal in traditional C [219]