Module Name: src
Committed By: rillig
Date: Sat Apr 22 20:21:13 UTC 2023
Modified Files:
src/tests/usr.bin/xlint/lint1: msg_351.c
Log Message:
tests/lint: demonstrate wrong warning about extern temporary identifier
To generate a diff of this commit:
cvs rdiff -u -r1.1 -r1.2 src/tests/usr.bin/xlint/lint1/msg_351.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_351.c
diff -u src/tests/usr.bin/xlint/lint1/msg_351.c:1.1 src/tests/usr.bin/xlint/lint1/msg_351.c:1.2
--- src/tests/usr.bin/xlint/lint1/msg_351.c:1.1 Tue Mar 28 14:44:35 2023
+++ src/tests/usr.bin/xlint/lint1/msg_351.c Sat Apr 22 20:21:13 2023
@@ -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 };