summaryrefslogtreecommitdiffstats
path: root/gcc/c/c-tree.h
diff options
context:
space:
mode:
authorjsm28 <jsm28@138bc75d-0d04-0410-961f-82ee72b054a4>2013-11-12 17:38:47 +0000
committerjsm28 <jsm28@138bc75d-0d04-0410-961f-82ee72b054a4>2013-11-12 17:38:47 +0000
commitd184e0c062dd6ac5543bc579372874c1109a2f8e (patch)
treedc4dfcb336fe8a6bf6fab451a6d9be16fbe15ec3 /gcc/c/c-tree.h
parent53e4a58f546ed712282469b7dd46f16eba7eb570 (diff)
downloadppe42-gcc-d184e0c062dd6ac5543bc579372874c1109a2f8e.tar.gz
ppe42-gcc-d184e0c062dd6ac5543bc579372874c1109a2f8e.zip
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
Diffstat (limited to 'gcc/c/c-tree.h')
-rw-r--r--gcc/c/c-tree.h4
1 files changed, 3 insertions, 1 deletions
diff --git a/gcc/c/c-tree.h b/gcc/c/c-tree.h
index 8dffa9c1674..502fdca4d7e 100644
--- a/gcc/c/c-tree.h
+++ b/gcc/c/c-tree.h
@@ -320,8 +320,10 @@ struct c_declspecs {
BOOL_BITFIELD inline_p : 1;
/* Whether "_Noreturn" was speciied. */
BOOL_BITFIELD noreturn_p : 1;
- /* Whether "__thread" was specified. */
+ /* Whether "__thread" or "_Thread_local" was specified. */
BOOL_BITFIELD thread_p : 1;
+ /* Whether "__thread" rather than "_Thread_local" was specified. */
+ BOOL_BITFIELD thread_gnu_p : 1;
/* Whether "const" was specified. */
BOOL_BITFIELD const_p : 1;
/* Whether "volatile" was specified. */
OpenPOWER on IntegriCloud