aboutsummaryrefslogtreecommitdiff
path: root/gcc/cp/parse.y
diff options
context:
space:
mode:
authorMark Mitchell <mark@codesourcery.com>1999-11-14 20:29:06 +0000
committerMark Mitchell <mmitchel@gcc.gnu.org>1999-11-14 20:29:06 +0000
commitcd9f6678b314661cdfde334387c1f06e9265c592 (patch)
treea3705bb81504816d3cc96124d755d7380e587405 /gcc/cp/parse.y
parentef835bb0c34abed46e891257dc9bb12abc8b926d (diff)
downloadgcc-cd9f6678b314661cdfde334387c1f06e9265c592.zip
gcc-cd9f6678b314661cdfde334387c1f06e9265c592.tar.gz
gcc-cd9f6678b314661cdfde334387c1f06e9265c592.tar.bz2
cp-tree.h (DECL_LOCAL_FUCNTION_P): New macro.
* cp-tree.h (DECL_LOCAL_FUCNTION_P): New macro. * call.c (equal_functions): Use DECL_LOCAL_FUCNTION_P, not TREE_PERMANENT. * decl.c (pushdecl): Set DECL_LOCAL_FUNCTION_P. * decl2.c (lookup_arg_dependent): Use it. * cp-tree.h (cp_finish_decl): Change prototype. (finish_static_data_member_decl): Likewise. (push_permanent_obstack): Remove declaration. (push_expression_obstack): Likewise. (push_scratch_obstack): Likewise. (DECL_TEMPLATE_PARM_P): Robustify. (SET_DECL_TEMPLATE_PARM_P): New macro. * class.c (add_method): Don't manipulate obstacks. (finish_vtbls): Likewise. * cvt.c (build_up_reference): Adjust calls to cp_finish_decl. * decl.c (binding_for_name): Don't manipulate obstacks. (maybe_push_to_top_level): Likewise. (pop_from_top_level): Likewise. (duplicate_decls): Likewise. (pushdecl): Likewise. (implicitly_declare): Likewise. (build_typename_type): Likewise. (start_decl): Likewise. (cp_finish_decl): Likewise. (finish_decl): Likewise. (destroy_local_static): Likewise. (expand_static_init): Likewise. (complete_array_type): Likewise. (grokvardecl): Likewise. (build_ptrmemfnc_type): Likewise. (grokdeclarator): Likewise. (xref_tag): Likewise. (xref_basetypes): Likewise. (start_enum): Likewise. (finish_enum): Likewise. (start_function): Likewise. (finish_function): Likewise. (start_method): Adjust call to cp_finish_decl. * decl2.c (finish_static_data_member_decl): Don't manipulate obstacks. (grokfield): Likewise. (grokbitfield): Likewise. (get_temp_name): Likewise. (get_sentry): Likewise. (fnish_file): Likewise. (lookup_arg_dependent): Likewise. * except.c (call_eh_info): Likewise. (push_eh_info): Likewise. (do_pop_exception): Likewise. (initialize_handler_parm): Likewise. (expand_end_eh_spec): Likewise. (alloc_eh_object): Likewise. (expand_throw): Likewise. * expr.c (extract_scalar_init): Likewise. * init.c (build_java_class_ref): Likewise. * lex.c (get_time_identifier): Likewise. (snarf_defarg): Likewise. (add_defarg_fn): Likewise. (is_global): Simplify. (do_identifier): Don't check TREE_PERMANENT. * method.c (emit_thunk): Don't manipulate obstacks. * parse.y (condition): Adjust call to cp_finish_decl. (primary): Likewise. (initdcl): Likewise. (initdcl0_innards): Likewise. (nomods_initdcl0): Likewise. * pt.c (push_inline_template_parms_recursive): Use SET_DECL_TEMPLATE_PARM_P. (process_template_parm): Likewise. (lookup_template_class): Don't manipulate obstacks. (instantiate_class_template): Adjust call to finish_static_data_member_decl. (tsubst_decl): Don't manipulate obstacks. (tsubst_expr): Likewise. (instantiate_template): Likewise. (instantiate_decl): Adjust calls to cp_finish_decl. * rtti.c (call_void_fn): Don't manipulate obstacks. (get_tinfo_var): Likewise. (get_tinfo_fn_unused): Likewise. (build_dynamic_cast_1): Likewise. (expand_si_desc): Likewise. (expand_class_desc): Likewise. (expand_ptr_desc): Likewise. (expand_attr_desc): Likewise. (expand_generic_desc): Likewise. (synthesize_tinfo_fn): Likewise. * search.c (expand_upcast_fixups): Likewise. * semantics.c (finish_asm_stmt): Likewise. (finish_named_return_value): Likewise. (begin_class_definition): Likewise. (finish_class_definition): Likewise. (finish_typeof): Likewise. * tree.c (build_cplus_method_type): Likewise. (reverse_path): Likewise. (copy_template_template_parm): Likewise. (build_expr_ptr_wrapper): Likewise. (push_expression_obstack): Remove. (push_permanent_obstack): Likewise. * typeck.c (mark_addressable): Likewise. From-SVN: r30527
Diffstat (limited to 'gcc/cp/parse.y')
-rw-r--r--gcc/cp/parse.y16
1 files changed, 6 insertions, 10 deletions
diff --git a/gcc/cp/parse.y b/gcc/cp/parse.y
index a988ef3..5e31354 100644
--- a/gcc/cp/parse.y
+++ b/gcc/cp/parse.y
@@ -1033,7 +1033,7 @@ condition:
}
init
{
- cp_finish_decl ($<ttype>6, $7, $4, 1, LOOKUP_ONLYCONVERTING);
+ cp_finish_decl ($<ttype>6, $7, $4, LOOKUP_ONLYCONVERTING);
$$ = convert_from_reference ($<ttype>6);
if (TREE_CODE (TREE_TYPE ($$)) == ARRAY_TYPE)
cp_error ("definition of array `%#D' in condition", $$);
@@ -1381,8 +1381,6 @@ primary:
| boolean.literal
| string
{
- if (processing_template_decl)
- push_obstacks (&permanent_obstack, &permanent_obstack);
$$ = combine_strings ($$);
/* combine_strings doesn't set up TYPE_MAIN_VARIANT of
a const array the way we want, so fix it. */
@@ -1390,8 +1388,6 @@ primary:
TREE_TYPE ($$) = build_cplus_array_type
(TREE_TYPE (TREE_TYPE ($$)),
TYPE_DOMAIN (TREE_TYPE ($$)));
- if (processing_template_decl)
- pop_obstacks ();
}
| '(' expr ')'
{ $$ = finish_parenthesized_expr ($2); }
@@ -1867,11 +1863,11 @@ initdcl:
$3, prefix_attributes); }
init
/* Note how the declaration of the variable is in effect while its init is parsed! */
- { cp_finish_decl ($<ttype>5, $6, $2, 1, LOOKUP_ONLYCONVERTING); }
+ { cp_finish_decl ($<ttype>5, $6, $2, LOOKUP_ONLYCONVERTING); }
| declarator maybeasm maybe_attribute
{ $<ttype>$ = start_decl ($<ttype>1, current_declspecs, 0,
$3, prefix_attributes);
- cp_finish_decl ($<ttype>$, NULL_TREE, $2, 1, 0); }
+ cp_finish_decl ($<ttype>$, NULL_TREE, $2, 0); }
;
/* This rule assumes a certain configuration of the parser stack.
@@ -1886,12 +1882,12 @@ initdcl0_innards:
/* Note how the declaration of the variable is in effect
while its init is parsed! */
init
- { cp_finish_decl ($<ttype>3, $4, $<ttype>0, 1,
+ { cp_finish_decl ($<ttype>3, $4, $<ttype>0,
LOOKUP_ONLYCONVERTING); }
| maybe_attribute
{ tree d;
parse_decl ($<ttype>-1, $<ttype>-2, $1, 0, &d);
- cp_finish_decl (d, NULL_TREE, $<ttype>0, 1, 0); }
+ cp_finish_decl (d, NULL_TREE, $<ttype>0, 0); }
;
initdcl0:
@@ -1914,7 +1910,7 @@ nomods_initdcl0:
| constructor_declarator maybeasm maybe_attribute
{ tree d;
parse_decl($1, NULL_TREE, $3, 0, &d);
- cp_finish_decl (d, NULL_TREE, $2, 1, 0); }
+ cp_finish_decl (d, NULL_TREE, $2, 0); }
;
/* the * rules are dummies to accept the Apollo extended syntax