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: document the fixed ass...
details: https://anonhg.NetBSD.org/src/rev/62ab95be15e2
branches: trunk
changeset: 1023377:62ab95be15e2
user: rillig <rillig%NetBSD.org@localhost>
date: Sun Sep 05 11:42:32 2021 +0000
description:
tests/lint: document the fixed assertion failure for struct
The change to cgram.y 1.328 from 2021-07-15 didn't fix the crash on
purpose, it was merely a side effect. The grammar rule that probably
fixed this was that the error handling now skips to the next T_SEMI,
which it didn't do before.
diffstat:
tests/usr.bin/xlint/lint1/decl_struct_member.c | 8 +++++---
tests/usr.bin/xlint/lint1/decl_struct_member.exp | 2 +-
2 files changed, 6 insertions(+), 4 deletions(-)
diffs (33 lines):
diff -r 3bb7c0293e62 -r 62ab95be15e2 tests/usr.bin/xlint/lint1/decl_struct_member.c
--- a/tests/usr.bin/xlint/lint1/decl_struct_member.c Sun Sep 05 10:18:31 2021 +0000
+++ b/tests/usr.bin/xlint/lint1/decl_struct_member.c Sun Sep 05 11:42:32 2021 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: decl_struct_member.c,v 1.11 2021/08/25 22:04:52 rillig Exp $ */
+/* $NetBSD: decl_struct_member.c,v 1.12 2021/09/05 11:42:32 rillig Exp $ */
# 3 "decl_struct_member.c"
struct multi_attributes {
@@ -77,10 +77,12 @@
*/
struct {
char a(_)0 /* expect: syntax error '0' */
-}
+
/*
- * FIXME: adding a semicolon here triggers another assertion:
+ * Before cgram.y 1.328 from 2021-07-15, lint ran into an assertion failure
+ * at the closing semicolon:
*
* assertion "t == NOTSPEC" failed in end_type at decl.c:774
*/
+};
/* expect+1: cannot recover from previous errors */
diff -r 3bb7c0293e62 -r 62ab95be15e2 tests/usr.bin/xlint/lint1/decl_struct_member.exp
--- a/tests/usr.bin/xlint/lint1/decl_struct_member.exp Sun Sep 05 10:18:31 2021 +0000
+++ b/tests/usr.bin/xlint/lint1/decl_struct_member.exp Sun Sep 05 11:42:32 2021 +0000
@@ -5,4 +5,4 @@
decl_struct_member.c(47): error: syntax error 'unnamed member' [249]
decl_struct_member.c(72): warning: illegal bit-field type 'array[8] of unsigned int' [35]
decl_struct_member.c(79): error: syntax error '0' [249]
-decl_struct_member.c(87): error: cannot recover from previous errors [224]
+decl_struct_member.c(89): error: cannot recover from previous errors [224]
Home |
Main Index |
Thread Index |
Old Index