Module Name:    src
Committed By:   rillig
Date:           Sat Jan  9 17:02:19 UTC 2021

Modified Files:
        src/tests/usr.bin/xlint/lint1: msg_108.c

Log Message:
lint: add test for message 108, which currently crashes


To generate a diff of this commit:
cvs rdiff -u -r1.1 -r1.2 src/tests/usr.bin/xlint/lint1/msg_108.c

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_108.c
diff -u src/tests/usr.bin/xlint/lint1/msg_108.c:1.1 src/tests/usr.bin/xlint/lint1/msg_108.c:1.2
--- src/tests/usr.bin/xlint/lint1/msg_108.c:1.1	Sat Jan  2 10:22:43 2021
+++ src/tests/usr.bin/xlint/lint1/msg_108.c	Sat Jan  9 17:02:19 2021
@@ -1,7 +1,22 @@
-/*	$NetBSD: msg_108.c,v 1.1 2021/01/02 10:22:43 rillig Exp $	*/
+/*	$NetBSD: msg_108.c,v 1.2 2021/01/09 17:02:19 rillig Exp $	*/
 # 3 "msg_108.c"
 
 // Test for message: operand of '%s' has incompatible type (%s != %s) [108]
 
 TODO: "Add example code that triggers the above message."
-TODO: "Add example code that almost triggers the above message."
+TODO: "Add example code that almost triggers the above message.";
+
+struct s {
+	int member;
+};
+
+void
+example(void)
+{
+	struct s s;
+
+	// FIXME: msg_108.c(14): lint error: common/tyname.c, 190: tspec_name(0)
+	// basic_type_name (t=NOTSPEC)
+	// warn_incompatible_types (op=COMPL, lt=STRUCT, rt=NOTSPEC)
+	//s = ~s;
+}

Reply via email to