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: demonstrate wrong warn...



details:   https://anonhg.NetBSD.org/src/rev/2ea4ac293b0f
branches:  trunk
changeset: 374437:2ea4ac293b0f
user:      rillig <rillig%NetBSD.org@localhost>
date:      Sat Apr 22 20:21:13 2023 +0000

description:
tests/lint: demonstrate wrong warning about extern temporary identifier

diffstat:

 tests/usr.bin/xlint/lint1/msg_351.c |  7 ++++++-
 1 files changed, 6 insertions(+), 1 deletions(-)

diffs (18 lines):

diff -r 157de4e7d955 -r 2ea4ac293b0f tests/usr.bin/xlint/lint1/msg_351.c
--- a/tests/usr.bin/xlint/lint1/msg_351.c       Sat Apr 22 20:17:19 2023 +0000
+++ b/tests/usr.bin/xlint/lint1/msg_351.c       Sat Apr 22 20:21:13 2023 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: msg_351.c,v 1.1 2023/03/28 14:44:35 rillig Exp $       */
+/*     $NetBSD: msg_351.c,v 1.2 2023/04/22 20:21:13 rillig Exp $       */
 # 3 "msg_351.c"
 
 // Test for message 351: 'extern' declaration of '%s' outside a header [351]
@@ -35,3 +35,8 @@ extern int external_ref;
 static int static_func_def(void);
 int extern_func_decl(void);
 extern int extern_func_decl_verbose(void);
+
+/* FIXME: Don't warn about the identifier starting with '00000'. */
+/* expect+2: warning: 'extern' declaration of 'dbl_ptr' outside a header [351] */
+/* expect+1: warning: 'extern' declaration of '00000000_tmp' outside a header [351] */
+double *dbl_ptr = &(double) { 0.0 };



Home | Main Index | Thread Index | Old Index