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: test 'extern thread_lo...



details:   https://anonhg.NetBSD.org/src/rev/309afda60c22
branches:  trunk
changeset: 377519:309afda60c22
user:      rillig <rillig%NetBSD.org@localhost>
date:      Sat Jul 15 16:11:32 2023 +0000

description:
tests/lint: test 'extern thread_local' storage classes

Seen in external/mpl/bind/dist/lib/isc/pthreads/include/isc/thread.h:32.

diffstat:

 tests/usr.bin/xlint/lint1/c23.c |  9 ++++++++-
 1 files changed, 8 insertions(+), 1 deletions(-)

diffs (20 lines):

diff -r ea5c316f2a6a -r 309afda60c22 tests/usr.bin/xlint/lint1/c23.c
--- a/tests/usr.bin/xlint/lint1/c23.c   Sat Jul 15 15:56:17 2023 +0000
+++ b/tests/usr.bin/xlint/lint1/c23.c   Sat Jul 15 16:11:32 2023 +0000
@@ -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;



Home | Main Index | Thread Index | Old Index