diff options
author | Steven Bosscher <steven@gcc.gnu.org> | 2005-06-30 12:17:52 +0000 |
---|---|---|
committer | Steven Bosscher <steven@gcc.gnu.org> | 2005-06-30 12:17:52 +0000 |
commit | c2f7fa15c0edbf2a3873ab402813f428d44908f8 (patch) | |
tree | 816c741b3c00522d35a8c6d2c7612f26999ef518 /gcc/cp | |
parent | 89632019a9e0a159df1bd6fcd76680257e846bd6 (diff) | |
download | gcc-c2f7fa15c0edbf2a3873ab402813f428d44908f8.zip gcc-c2f7fa15c0edbf2a3873ab402813f428d44908f8.tar.gz gcc-c2f7fa15c0edbf2a3873ab402813f428d44908f8.tar.bz2 |
coretypes.h (tls_model): Add TLS_MODEL_NONE as 0.
* coretypes.h (tls_model): Add TLS_MODEL_NONE as 0.
* tree.h (struct tree_decl): New field `tls_model'.
(DECL_TLS_MODEL): New.
(DECL_THREAD_LOCAL_P): Rename from DECL_THREAD_LOCAL, make it
a predicate.
* rtl.h (decl_default_tls_model): Add prototype for it.
* varasm.c (decl_tls_model): Rewritten and renamed to ...
(decl_default_tls_model): ... this.
(default_encode_section_info): Use DECL_TLS_MODEL instead of
decl_tls_model.
(assemble_variable): Replace DECL_THREAD_LOCAL with
DECL_THREAD_LOCAL_P.
(default_section_type_flags_1): Likewise.
(categorize_decl_for_section): Likewise.
* tree.c (staticp): Likewise.
(recompute_tree_invarant_for_addr_expr): Likewise.
* drawf2out (loc_descriptor_from_tree_1): Likewise.
* c-decl.c (diagnose_mismatched_decls): Likewise.
with DECL_THREAD_LOCAL_P.
(start_decl): Likewise.
* print-tree.c (print_node): Likewise. Print the TLS model.
(grokdeclarator): Set the default DECL_TLS_MODEL here.
* c-common.c (handle_tls_model_attribute): Rewrite to set the
TLS model up based on the attribute. Never add the attribute
to the decl's attributes list.
* config/sparc/sol2.h (ASM_DECLARE_OBJECT_NAME): Replace
DECL_THREAD_LOCAL with DECL_THREAD_LOCAL_P.
cp/
* decl.c (start_decl): Replace DECL_THREAD_LOCAL with
DECL_THREAD_LOCAL_P.
(cp_finish_decl): Likewise.
(grokvardecl): Set the default DECL_TLS_MODEL here.
From-SVN: r101465
Diffstat (limited to 'gcc/cp')
-rw-r--r-- | gcc/cp/ChangeLog | 7 | ||||
-rw-r--r-- | gcc/cp/decl.c | 8 |
2 files changed, 11 insertions, 4 deletions
diff --git a/gcc/cp/ChangeLog b/gcc/cp/ChangeLog index a973622..e7a5ca2 100644 --- a/gcc/cp/ChangeLog +++ b/gcc/cp/ChangeLog @@ -1,3 +1,10 @@ +2005-06-30 Steven Bosscher <stevenb@suse.de> + + * decl.c (start_decl): Replace DECL_THREAD_LOCAL with + DECL_THREAD_LOCAL_P. + (cp_finish_decl): Likewise. + (grokvardecl): Set the default DECL_TLS_MODEL here. + 2005-06-28 Joseph S. Myers <joseph@codesourcery.com> * cvt.c (ocp_convert): Use invalid_conversion hook. diff --git a/gcc/cp/decl.c b/gcc/cp/decl.c index 5f2ea69..4379973 100644 --- a/gcc/cp/decl.c +++ b/gcc/cp/decl.c @@ -3749,7 +3749,7 @@ start_decl (const cp_declarator *declarator, produce errors about redefs; to do this we force variables into the data segment. */ DECL_COMMON (tem) = ((TREE_CODE (tem) != VAR_DECL - || !DECL_THREAD_LOCAL (tem)) + || !DECL_THREAD_LOCAL_P (tem)) && (flag_conserve_space || ! TREE_PUBLIC (tem))); #endif @@ -4808,7 +4808,7 @@ cp_finish_decl (tree decl, tree init, tree asmspec_tree, int flags) { /* Only PODs can have thread-local storage. Other types may require various kinds of non-trivial initialization. */ - if (DECL_THREAD_LOCAL (decl) && !pod_type_p (TREE_TYPE (decl))) + if (DECL_THREAD_LOCAL_P (decl) && !pod_type_p (TREE_TYPE (decl))) error ("%qD cannot be thread-local because it has non-POD type %qT", decl, TREE_TYPE (decl)); /* Convert the initializer to the type of DECL, if we have not @@ -4822,7 +4822,7 @@ cp_finish_decl (tree decl, tree init, tree asmspec_tree, int flags) { init = check_initializer (decl, init, flags, &cleanup); /* Thread-local storage cannot be dynamically initialized. */ - if (DECL_THREAD_LOCAL (decl) && init) + if (DECL_THREAD_LOCAL_P (decl) && init) { error ("%qD is thread-local and so cannot be dynamically " "initialized", decl); @@ -5884,7 +5884,7 @@ grokvardecl (tree type, if (declspecs->specs[(int)ds_thread]) { if (targetm.have_tls) - DECL_THREAD_LOCAL (decl) = 1; + DECL_TLS_MODEL (decl) = decl_default_tls_model (decl); else /* A mere warning is sure to result in improper semantics at runtime. Don't bother to allow this to compile. */ |