]> git.ipfire.org Git - thirdparty/gcc.git/commit - gcc/c-family/c-common.c
c-family:
authorjsm28 <jsm28@138bc75d-0d04-0410-961f-82ee72b054a4>
Tue, 12 Nov 2013 17:38:47 +0000 (17:38 +0000)
committerjsm28 <jsm28@138bc75d-0d04-0410-961f-82ee72b054a4>
Tue, 12 Nov 2013 17:38:47 +0000 (17:38 +0000)
commitd184e0c062dd6ac5543bc579372874c1109a2f8e
treedc4dfcb336fe8a6bf6fab451a6d9be16fbe15ec3
parent53e4a58f546ed712282469b7dd46f16eba7eb570
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.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@204711 138bc75d-0d04-0410-961f-82ee72b054a4
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