Module Name: src
Committed By: rillig
Date: Sat Jul 15 16:11:32 UTC 2023
Modified Files:
src/tests/usr.bin/xlint/lint1: c23.c
Log Message:
tests/lint: test 'extern thread_local' storage classes
Seen in external/mpl/bind/dist/lib/isc/pthreads/include/isc/thread.h:32.
To generate a diff of this commit:
cvs rdiff -u -r1.3 -r1.4 src/tests/usr.bin/xlint/lint1/c23.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/c23.c
diff -u src/tests/usr.bin/xlint/lint1/c23.c:1.3 src/tests/usr.bin/xlint/lint1/c23.c:1.4
--- src/tests/usr.bin/xlint/lint1/c23.c:1.3 Fri Jul 14 08:53:52 2023
+++ src/tests/usr.bin/xlint/lint1/c23.c Sat Jul 15 16:11:32 2023
@@ -1,4 +1,4 @@
-/* $NetBSD: c23.c,v 1.3 2023/07/14 08:53:52 rillig Exp $ */
+/* $NetBSD: c23.c,v 1.4 2023/07/15 16:11:32 rillig Exp $ */
# 3 "c23.c"
// Tests for the option -Ac23, which allows features from C23 and all earlier
@@ -39,3 +39,10 @@ function(void)
// this case.
thread_local int function_scoped_thread_local;
}
+
+/* FIXME: 'thread_local' and 'extern' can be combined. */
+/* expect+1: error: only one storage class allowed [7] */
+extern thread_local int extern_thread_local_1;
+/* FIXME: 'thread_local' and 'extern' can be combined. */
+/* expect+1: error: only one storage class allowed [7] */
+thread_local extern int extern_thread_local_2;