Module Name: src
Committed By: rillig
Date: Sun Jan 24 11:13:22 UTC 2021
Modified Files:
src/tests/usr.bin/xlint/lint1: msg_124.c msg_124.exp
Log Message:
lint: demonstrate wrong 124 due to bug in is_typeok_eq
To generate a diff of this commit:
cvs rdiff -u -r1.3 -r1.4 src/tests/usr.bin/xlint/lint1/msg_124.c
cvs rdiff -u -r1.6 -r1.7 src/tests/usr.bin/xlint/lint1/msg_124.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/msg_124.c
diff -u src/tests/usr.bin/xlint/lint1/msg_124.c:1.3 src/tests/usr.bin/xlint/lint1/msg_124.c:1.4
--- src/tests/usr.bin/xlint/lint1/msg_124.c:1.3 Sun Jan 24 10:50:42 2021
+++ src/tests/usr.bin/xlint/lint1/msg_124.c Sun Jan 24 11:13:22 2021
@@ -1,8 +1,10 @@
-/* $NetBSD: msg_124.c,v 1.3 2021/01/24 10:50:42 rillig Exp $ */
+/* $NetBSD: msg_124.c,v 1.4 2021/01/24 11:13:22 rillig Exp $ */
# 3 "msg_124.c"
// Test for message: illegal pointer combination, op %s [124]
+/* lint1-extra-flags: -s */
+
typedef void(*signal_handler)(int);
typedef signal_handler(*sys_signal)(signal_handler);
@@ -27,13 +29,13 @@ compare_pointers(const void *vp, const c
{
ok(vp == cp);
ok(vp == ip);
- ok(vp == fp);
+ ok(vp == fp); /* expect: 274 */
not_ok(cp == ip); /* expect: 124 */
not_ok(cp == fp); /* expect: 124 */
ok(vp == (void *)0);
ok(cp == (void *)0);
ok(ip == (void *)0);
- ok(fp == (void *)0);
+ ok(fp == (void *)0); /*FIXME*//* expect: 274 */
ok(vp == 0);
ok(cp == 0);
ok(ip == 0);
Index: src/tests/usr.bin/xlint/lint1/msg_124.exp
diff -u src/tests/usr.bin/xlint/lint1/msg_124.exp:1.6 src/tests/usr.bin/xlint/lint1/msg_124.exp:1.7
--- src/tests/usr.bin/xlint/lint1/msg_124.exp:1.6 Sun Jan 24 10:50:42 2021
+++ src/tests/usr.bin/xlint/lint1/msg_124.exp Sun Jan 24 11:13:22 2021
@@ -1,5 +1,7 @@
-msg_124.c(16): warning: illegal pointer combination (pointer to function(int) returning void) and (pointer to int), op = [124]
-msg_124.c(17): warning: illegal pointer combination (pointer to function(pointer to function(int) returning void) returning pointer to function(int) returning void) and (pointer to int), op = [124]
-msg_124.c(18): warning: illegal pointer combination (pointer to function(pointer to const char, ...) returning int) and (pointer to int), op = [124]
-msg_124.c(31): warning: illegal pointer combination (pointer to const char) and (pointer to const int), op == [124]
-msg_124.c(32): warning: illegal pointer combination (pointer to const char) and (pointer to function(int) returning void), op == [124]
+msg_124.c(18): warning: illegal pointer combination (pointer to function(int) returning void) and (pointer to int), op = [124]
+msg_124.c(19): warning: illegal pointer combination (pointer to function(pointer to function(int) returning void) returning pointer to function(int) returning void) and (pointer to int), op = [124]
+msg_124.c(20): warning: illegal pointer combination (pointer to function(pointer to const char, ...) returning int) and (pointer to int), op = [124]
+msg_124.c(32): warning: ANSI C forbids comparison of 'void *' with function pointer [274]
+msg_124.c(33): warning: illegal pointer combination (pointer to const char) and (pointer to const int), op == [124]
+msg_124.c(34): warning: illegal pointer combination (pointer to const char) and (pointer to function(int) returning void), op == [124]
+msg_124.c(38): warning: ANSI C forbids comparison of function pointer with 'void *' [274]