diff options
author | Joseph Myers <joseph@codesourcery.com> | 2013-11-12 17:38:47 +0000 |
---|---|---|
committer | Joseph Myers <jsm28@gcc.gnu.org> | 2013-11-12 17:38:47 +0000 |
commit | 582d9b50ed4166d1e561b76db84e73298a1429a9 (patch) | |
tree | dc4dfcb336fe8a6bf6fab451a6d9be16fbe15ec3 /gcc/c/c-parser.c | |
parent | e9dc054758a019d3687d1b7e4e188bd5d2468444 (diff) | |
download | gcc-582d9b50ed4166d1e561b76db84e73298a1429a9.zip gcc-582d9b50ed4166d1e561b76db84e73298a1429a9.tar.gz gcc-582d9b50ed4166d1e561b76db84e73298a1429a9.tar.bz2 |
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
Diffstat (limited to 'gcc/c/c-parser.c')
-rw-r--r-- | gcc/c/c-parser.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/gcc/c/c-parser.c b/gcc/c/c-parser.c index 09cce1c..5b4665a 100644 --- a/gcc/c/c-parser.c +++ b/gcc/c/c-parser.c @@ -1969,6 +1969,9 @@ c_parser_static_assert_declaration_no_semi (c_parser *parser) static auto register + _Thread_local + + (_Thread_local is new in C11.) C99 6.7.4: function-specifier: |