Module Name:    src
Committed By:   rillig
Date:           Mon Jun 19 12:33:43 UTC 2023

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

Log Message:
tests/lint: comma operators are not allowed in constant expressions


To generate a diff of this commit:
cvs rdiff -u -r1.10 -r1.11 src/tests/usr.bin/xlint/lint1/msg_161.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_161.c
diff -u src/tests/usr.bin/xlint/lint1/msg_161.c:1.10 src/tests/usr.bin/xlint/lint1/msg_161.c:1.11
--- src/tests/usr.bin/xlint/lint1/msg_161.c:1.10	Tue Mar 28 14:44:35 2023
+++ src/tests/usr.bin/xlint/lint1/msg_161.c	Mon Jun 19 12:33:43 2023
@@ -1,4 +1,4 @@
-/*	$NetBSD: msg_161.c,v 1.10 2023/03/28 14:44:35 rillig Exp $	*/
+/*	$NetBSD: msg_161.c,v 1.11 2023/06/19 12:33:43 rillig Exp $	*/
 # 3 "msg_161.c"
 
 // Test for message: constant in conditional context [161]
@@ -77,4 +77,8 @@ const _Bool conditions[] = {
 	/* expect+2: warning: constant in conditional context [161] */
 	/* expect+1: error: non-constant initializer [177] */
 	""[0] == '\0' && 0 == 0,
+	/* C99 6.6p3: Constant expressions shall not contain [...] comma */
+	/* expect+2: warning: expression has null effect [129] */
+	/* expect+1: error: non-constant initializer [177] */
+	(0 == 0, 1 == 0),
 };

Reply via email to