]> git.ipfire.org Git - thirdparty/gcc.git/commit
c-common.c (c_common_reswords): Add _Thread_local.
authorJoseph Myers <joseph@codesourcery.com>
Tue, 12 Nov 2013 17:38:47 +0000 (17:38 +0000)
committerJoseph Myers <jsm28@gcc.gnu.org>
Tue, 12 Nov 2013 17:38:47 +0000 (17:38 +0000)
commit582d9b50ed4166d1e561b76db84e73298a1429a9
treedc4dfcb336fe8a6bf6fab451a6d9be16fbe15ec3
parente9dc054758a019d3687d1b7e4e188bd5d2468444
c-common.c (c_common_reswords): Add _Thread_local.

c-family:
* c-common.c (c_common_reswords): Add _Thread_local.

c:
* c-tree.h (struct c_declspecs): Add thread_gnu_p field.
* c-parser.c (c_parser_declspecs): Mention _Thread_local in
comment.
* c-decl.c (shadow_tag_warned, grokdeclarator): Mention __thread
or _Thread_local as appropriate in diagnostics.
(build_null_declspecs): Initialize ret->thread_gnu_p.
(declspecs_add_scspec): Handle either __thread or _Thread_local
for RID_THREAD.  Diagnose _Thread_local for pre-C11 standards if
pedantic.  Do not disallow _Thread_local extern and _Thread_local
static.

testsuite:
* gcc.dg/c90-thread-local-1.c, gcc.dg/c99-thread-local-1.c,
gcc.dg/c11-thread-local-1.c, gcc.dg/c11-thread-local-2.c: New
tests.
* gcc.dg/tls/diag-2.c, objc.dg/tls/diag-2.m: Update expected
diagnostics.

From-SVN: r204711
13 files changed:
gcc/c-family/ChangeLog
gcc/c-family/c-common.c
gcc/c/ChangeLog
gcc/c/c-decl.c
gcc/c/c-parser.c
gcc/c/c-tree.h
gcc/testsuite/ChangeLog
gcc/testsuite/gcc.dg/c11-thread-local-1.c [new file with mode: 0644]
gcc/testsuite/gcc.dg/c11-thread-local-2.c [new file with mode: 0644]
gcc/testsuite/gcc.dg/c90-thread-local-1.c [new file with mode: 0644]
gcc/testsuite/gcc.dg/c99-thread-local-1.c [new file with mode: 0644]
gcc/testsuite/gcc.dg/tls/diag-2.c
gcc/testsuite/objc.dg/tls/diag-2.m