Module Name: src
Committed By: rillig
Date: Fri Apr 2 22:41:54 UTC 2021
Modified Files:
src/tests/usr.bin/xlint/lint1: d_c99_bool_strict.exp msg_239.c
msg_239.exp
src/usr.bin/xlint/lint1: err.c tree.c
Log Message:
lint: reword message about constant argument to '!'
In the other messages, operators are typically written in their literal
form as well. Using single quotes disambiguates them from normal
punctuation.
To generate a diff of this commit:
cvs rdiff -u -r1.23 -r1.24 \
src/tests/usr.bin/xlint/lint1/d_c99_bool_strict.exp
cvs rdiff -u -r1.3 -r1.4 src/tests/usr.bin/xlint/lint1/msg_239.c \
src/tests/usr.bin/xlint/lint1/msg_239.exp
cvs rdiff -u -r1.100 -r1.101 src/usr.bin/xlint/lint1/err.c
cvs rdiff -u -r1.264 -r1.265 src/usr.bin/xlint/lint1/tree.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/d_c99_bool_strict.exp
diff -u src/tests/usr.bin/xlint/lint1/d_c99_bool_strict.exp:1.23 src/tests/usr.bin/xlint/lint1/d_c99_bool_strict.exp:1.24
--- src/tests/usr.bin/xlint/lint1/d_c99_bool_strict.exp:1.23 Sun Mar 21 20:44:59 2021
+++ src/tests/usr.bin/xlint/lint1/d_c99_bool_strict.exp Fri Apr 2 22:41:54 2021
@@ -64,9 +64,9 @@ d_c99_bool_strict.c(386): error: control
d_c99_bool_strict.c(392): error: controlling expression must be bool, not 'double' [333]
d_c99_bool_strict.c(398): error: controlling expression must be bool, not 'pointer' [333]
d_c99_bool_strict.c(419): warning: constant in conditional context [161]
-d_c99_bool_strict.c(419): warning: constant argument to NOT [239]
+d_c99_bool_strict.c(419): warning: constant argument to '!' [239]
d_c99_bool_strict.c(420): warning: constant in conditional context [161]
-d_c99_bool_strict.c(420): warning: constant argument to NOT [239]
+d_c99_bool_strict.c(420): warning: constant argument to '!' [239]
d_c99_bool_strict.c(424): error: operand of '!' must be bool, not 'int' [330]
d_c99_bool_strict.c(425): error: operand of '!' must be bool, not 'int' [330]
d_c99_bool_strict.c(426): error: operand of '!' must be bool, not 'int' [330]
Index: src/tests/usr.bin/xlint/lint1/msg_239.c
diff -u src/tests/usr.bin/xlint/lint1/msg_239.c:1.3 src/tests/usr.bin/xlint/lint1/msg_239.c:1.4
--- src/tests/usr.bin/xlint/lint1/msg_239.c:1.3 Fri Apr 2 22:38:42 2021
+++ src/tests/usr.bin/xlint/lint1/msg_239.c Fri Apr 2 22:41:54 2021
@@ -1,7 +1,7 @@
-/* $NetBSD: msg_239.c,v 1.3 2021/04/02 22:38:42 rillig Exp $ */
+/* $NetBSD: msg_239.c,v 1.4 2021/04/02 22:41:54 rillig Exp $ */
# 3 "msg_239.c"
-// Test for message: constant argument to NOT [239]
+// Test for message: constant argument to '!' [239]
/* lint1-extra-flags: -h */
Index: src/tests/usr.bin/xlint/lint1/msg_239.exp
diff -u src/tests/usr.bin/xlint/lint1/msg_239.exp:1.3 src/tests/usr.bin/xlint/lint1/msg_239.exp:1.4
--- src/tests/usr.bin/xlint/lint1/msg_239.exp:1.3 Fri Apr 2 22:38:42 2021
+++ src/tests/usr.bin/xlint/lint1/msg_239.exp Fri Apr 2 22:41:54 2021
@@ -1,4 +1,4 @@
msg_239.c(13): warning: constant in conditional context [161]
-msg_239.c(13): warning: constant argument to NOT [239]
+msg_239.c(13): warning: constant argument to '!' [239]
msg_239.c(14): warning: constant in conditional context [161]
-msg_239.c(14): warning: constant argument to NOT [239]
+msg_239.c(14): warning: constant argument to '!' [239]
Index: src/usr.bin/xlint/lint1/err.c
diff -u src/usr.bin/xlint/lint1/err.c:1.100 src/usr.bin/xlint/lint1/err.c:1.101
--- src/usr.bin/xlint/lint1/err.c:1.100 Fri Apr 2 12:16:50 2021
+++ src/usr.bin/xlint/lint1/err.c Fri Apr 2 22:41:53 2021
@@ -1,4 +1,4 @@
-/* $NetBSD: err.c,v 1.100 2021/04/02 12:16:50 rillig Exp $ */
+/* $NetBSD: err.c,v 1.101 2021/04/02 22:41:53 rillig Exp $ */
/*
* Copyright (c) 1994, 1995 Jochen Pohl
@@ -37,7 +37,7 @@
#include <sys/cdefs.h>
#if defined(__RCSID) && !defined(lint)
-__RCSID("$NetBSD: err.c,v 1.100 2021/04/02 12:16:50 rillig Exp $");
+__RCSID("$NetBSD: err.c,v 1.101 2021/04/02 22:41:53 rillig Exp $");
#endif
#include <sys/types.h>
@@ -293,7 +293,7 @@ const char *msgs[] = {
"static function %s unused", /* 236 */
"redeclaration of formal parameter %s", /* 237 */
"initialization of union is illegal in traditional C", /* 238 */
- "constant argument to NOT", /* 239 */
+ "constant argument to '!'", /* 239 */
"assignment of different structures (%s != %s)", /* 240 */
"dubious operation on enum, op %s", /* 241 */
"combination of '%s' and '%s', op %s", /* 242 */
Index: src/usr.bin/xlint/lint1/tree.c
diff -u src/usr.bin/xlint/lint1/tree.c:1.264 src/usr.bin/xlint/lint1/tree.c:1.265
--- src/usr.bin/xlint/lint1/tree.c:1.264 Fri Apr 2 17:10:52 2021
+++ src/usr.bin/xlint/lint1/tree.c Fri Apr 2 22:41:53 2021
@@ -1,4 +1,4 @@
-/* $NetBSD: tree.c,v 1.264 2021/04/02 17:10:52 rillig Exp $ */
+/* $NetBSD: tree.c,v 1.265 2021/04/02 22:41:53 rillig Exp $ */
/*
* Copyright (c) 1994, 1995 Jochen Pohl
@@ -37,7 +37,7 @@
#include <sys/cdefs.h>
#if defined(__RCSID) && !defined(lint)
-__RCSID("$NetBSD: tree.c,v 1.264 2021/04/02 17:10:52 rillig Exp $");
+__RCSID("$NetBSD: tree.c,v 1.265 2021/04/02 22:41:53 rillig Exp $");
#endif
#include <float.h>
@@ -3208,7 +3208,7 @@ fold_test(tnode_t *tn)
switch (tn->tn_op) {
case NOT:
if (hflag && !constcond_flag)
- /* constant argument to NOT */
+ /* constant argument to '!' */
warning(239);
v->v_quad = !l ? 1 : 0;
break;