Module Name:    src
Committed By:   rillig
Date:           Fri Jan 15 22:04:27 UTC 2021

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

Log Message:
lint: demonstrate wrong message for comma operator


To generate a diff of this commit:
cvs rdiff -u -r1.4 -r1.5 src/tests/usr.bin/xlint/lint1/d_c99_bool_strict.c
cvs rdiff -u -r1.3 -r1.4 src/tests/usr.bin/xlint/lint1/d_c99_bool_strict.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/d_c99_bool_strict.c
diff -u src/tests/usr.bin/xlint/lint1/d_c99_bool_strict.c:1.4 src/tests/usr.bin/xlint/lint1/d_c99_bool_strict.c:1.5
--- src/tests/usr.bin/xlint/lint1/d_c99_bool_strict.c:1.4	Tue Jan 12 20:42:01 2021
+++ src/tests/usr.bin/xlint/lint1/d_c99_bool_strict.c	Fri Jan 15 22:04:27 2021
@@ -1,4 +1,4 @@
-/*	$NetBSD: d_c99_bool_strict.c,v 1.4 2021/01/12 20:42:01 rillig Exp $	*/
+/*	$NetBSD: d_c99_bool_strict.c,v 1.5 2021/01/15 22:04:27 rillig Exp $	*/
 # 3 "d_c99_bool_strict.c"
 
 /*
@@ -521,3 +521,10 @@ compare_var_with_constant(bool b)
 	bool t4 = t3 != 1;
 	return t4 ^ t3;
 }
+
+bool
+SB003_operand_comma(bool b)
+{
+	b = (b, !b);		/* FIXME *//* expect: 336, 337 */
+	return b;
+}

Index: src/tests/usr.bin/xlint/lint1/d_c99_bool_strict.exp
diff -u src/tests/usr.bin/xlint/lint1/d_c99_bool_strict.exp:1.3 src/tests/usr.bin/xlint/lint1/d_c99_bool_strict.exp:1.4
--- src/tests/usr.bin/xlint/lint1/d_c99_bool_strict.exp:1.3	Tue Jan 12 20:42:01 2021
+++ src/tests/usr.bin/xlint/lint1/d_c99_bool_strict.exp	Fri Jan 15 22:04:27 2021
@@ -101,3 +101,5 @@ d_c99_bool_strict.c(453): warning: illeg
 d_c99_bool_strict.c(456): argument #1 expects '_Bool', gets passed 'pointer' [334]
 d_c99_bool_strict.c(456): warning: illegal combination of integer (int) and pointer (pointer to const char), arg #2 [154]
 d_c99_bool_strict.c(468): argument #1 expects '_Bool', gets passed 'int' [334]
+d_c99_bool_strict.c(528): left operand of ',' must not be bool [336]
+d_c99_bool_strict.c(528): right operand of ',' must not be bool [337]

Reply via email to