Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/tests/usr.bin/xlint/lint1 tests/lint: extend test for messag...



details:   https://anonhg.NetBSD.org/src/rev/dcf1d365432e
branches:  trunk
changeset: 984286:dcf1d365432e
user:      rillig <rillig%NetBSD.org@localhost>
date:      Wed Jun 30 14:15:39 2021 +0000

description:
tests/lint: extend test for message 215 about implicit function

diffstat:

 tests/usr.bin/xlint/lint1/msg_215.c   |  6 +++++-
 tests/usr.bin/xlint/lint1/msg_215.exp |  4 +++-
 2 files changed, 8 insertions(+), 2 deletions(-)

diffs (30 lines):

diff -r 199245a57071 -r dcf1d365432e tests/usr.bin/xlint/lint1/msg_215.c
--- a/tests/usr.bin/xlint/lint1/msg_215.c       Wed Jun 30 14:11:08 2021 +0000
+++ b/tests/usr.bin/xlint/lint1/msg_215.c       Wed Jun 30 14:15:39 2021 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: msg_215.c,v 1.5 2021/06/30 14:11:08 rillig Exp $       */
+/*     $NetBSD: msg_215.c,v 1.6 2021/06/30 14:15:39 rillig Exp $       */
 # 3 "msg_215.c"
 
 // Test for message: function implicitly declared to return int [215]
@@ -20,6 +20,10 @@
        /* expect+1: error: function implicitly declared to return int [215] */
        name();
 
+       /* expect+2: error: 'parenthesized' undefined [99] */
+       /* expect+1: error: illegal function (type int) [149] */
+       (parenthesized)();
+
        /* expect+2: error: type 'struct str' does not have member 'member' [101] */
        /* expect+1: error: illegal function (type int) [149] */
        str.member();
diff -r 199245a57071 -r dcf1d365432e tests/usr.bin/xlint/lint1/msg_215.exp
--- a/tests/usr.bin/xlint/lint1/msg_215.exp     Wed Jun 30 14:11:08 2021 +0000
+++ b/tests/usr.bin/xlint/lint1/msg_215.exp     Wed Jun 30 14:15:39 2021 +0000
@@ -1,3 +1,5 @@
 msg_215.c(21): error: function implicitly declared to return int [215]
-msg_215.c(25): error: type 'struct str' does not have member 'member' [101]
+msg_215.c(25): error: 'parenthesized' undefined [99]
 msg_215.c(25): error: illegal function (type int) [149]
+msg_215.c(29): error: type 'struct str' does not have member 'member' [101]
+msg_215.c(29): error: illegal function (type int) [149]



Home | Main Index | Thread Index | Old Index