aboutsummaryrefslogtreecommitdiff
path: root/gcc/cp/decl.c
diff options
context:
space:
mode:
authorJakub Jelinek <jakub@redhat.com>2009-09-24 11:21:39 +0200
committerJakub Jelinek <jakub@gcc.gnu.org>2009-09-24 11:21:39 +0200
commit9f62cb922fdb83cd32244f3dd7b537d369557a3e (patch)
tree0c79112ec645e731d0045fca38a62354054c2798 /gcc/cp/decl.c
parent78605f0a685eddfb20bcf786f7a004747cc705e8 (diff)
downloadgcc-9f62cb922fdb83cd32244f3dd7b537d369557a3e.zip
gcc-9f62cb922fdb83cd32244f3dd7b537d369557a3e.tar.gz
gcc-9f62cb922fdb83cd32244f3dd7b537d369557a3e.tar.bz2
cgraphunit.c (cgraph_lower_function): Revert last change.
* cgraphunit.c (cgraph_lower_function): Revert last change. * targhooks.c (default_static_chain): Use !DECL_STATIC_CHAIN instead of DECL_NO_STATIC_CHAIN. * tree-cfg.c (verify_gimple_call): Likewise. * tree-nested.c (get_chain_decl, get_chain_field, convert_tramp_reference_op, convert_gimple_call): Likewise. (convert_all_function_calls): Likewise. Always set or clear DECL_STATIC_CHAIN initially, for !n->outer clear it. (lower_nested_functions): Remove DECL_NO_STATIC_CHAIN checking code. * c-parser.c (c_parser_declaration_or_fndef): Set DECL_STATIC_CHAIN if nested. * print-tree.c (print_node): Handle DECL_STATIC_CHAIN instead of DECL_NO_STATIC_CHAIN. * config/i386/i386.c (ix86_static_chain): Use !DECL_STATIC_CHAIN instead of DECL_NO_STATIC_CHAIN. (ix86_function_regparm, find_drap_reg): Likewise. Don't test decl_function_context. * varasm.c (initializer_constant_valid_p): Likewise. * tree.h (DECL_NO_STATIC_CHAIN): Renamed to ... (DECL_STATIC_CHAIN): ... this. * config/moxie/moxie.c (moxie_static_chain): Use !DECL_STATIC_CHAIN instead of DECL_NO_STATIC_CHAIN. * method.c (make_thunk, make_alias_for): Don't set DECL_NO_STATIC_CHAIN. * decl.c (builtin_function_1, grokfndecl): Likewise. * lex.c (build_lang_decl): Likewise. * gcc-interface/utils.c (gnat_pushdecl): Don't set DECL_NO_STATIC_CHAIN, set DECL_STATIC_CHAIN for nested functions. * testsuite/gcc.target/i386/pr12329.c: Adjust. From-SVN: r152114
Diffstat (limited to 'gcc/cp/decl.c')
-rw-r--r--gcc/cp/decl.c7
1 files changed, 0 insertions, 7 deletions
diff --git a/gcc/cp/decl.c b/gcc/cp/decl.c
index 407f734..c720f6c 100644
--- a/gcc/cp/decl.c
+++ b/gcc/cp/decl.c
@@ -3580,10 +3580,6 @@ builtin_function_1 (tree decl, tree context, bool is_global)
retrofit_lang_decl (decl);
- /* All nesting of C++ functions is lexical; there is never a "static
- chain" in the sense of GNU C nested functions. */
- DECL_NO_STATIC_CHAIN (decl) = 1;
-
DECL_ARTIFICIAL (decl) = 1;
SET_OVERLOADED_OPERATOR_CODE (decl, ERROR_MARK);
SET_DECL_LANGUAGE (decl, lang_c);
@@ -6779,9 +6775,6 @@ grokfndecl (tree ctype,
&& !grok_op_properties (decl, /*complain=*/true))
return NULL_TREE;
- if (ctype && decl_function_context (decl))
- DECL_NO_STATIC_CHAIN (decl) = 1;
-
if (funcdef_flag)
/* Make the init_value nonzero so pushdecl knows this is not
tentative. error_mark_node is replaced later with the BLOCK. */