Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/tests/usr.bin/xlint/lint1 tests/lint: add test for character...
details: https://anonhg.NetBSD.org/src/rev/9edc0e9d68a1
branches: trunk
changeset: 1021989:9edc0e9d68a1
user: rillig <rillig%NetBSD.org@localhost>
date: Tue Jun 29 07:28:01 2021 +0000
description:
tests/lint: add test for character constant using backslash-newline
diffstat:
tests/usr.bin/xlint/lint1/lex_char.c | 13 ++++++++++++-
1 files changed, 12 insertions(+), 1 deletions(-)
diffs (24 lines):
diff -r 6168d39bb26f -r 9edc0e9d68a1 tests/usr.bin/xlint/lint1/lex_char.c
--- a/tests/usr.bin/xlint/lint1/lex_char.c Tue Jun 29 07:23:21 2021 +0000
+++ b/tests/usr.bin/xlint/lint1/lex_char.c Tue Jun 29 07:28:01 2021 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: lex_char.c,v 1.3 2021/06/29 07:17:43 rillig Exp $ */
+/* $NetBSD: lex_char.c,v 1.4 2021/06/29 07:28:01 rillig Exp $ */
# 3 "lex_char.c"
/*
@@ -58,3 +58,14 @@
/* U+000D carriage return */
sink('\r');
}
+
+/*
+ * Even though backslash-newline is not supported by C99, lint accepts it
+ * in any mode, even for traditional C.
+ */
+char ch = '\
+\
+\
+\
+\
+x';
Home |
Main Index |
Thread Index |
Old Index