From 1456deafd7978b7201704ac822231c9ac4f260fe Mon Sep 17 00:00:00 2001 From: Jason Merrill Date: Thu, 9 Oct 2003 01:44:57 -0400 Subject: stmt.c (resolve_asm_operand_names): Call check_unique_operand_names here. * stmt.c (resolve_asm_operand_names): Call check_unique_operand_names here. (expand_asm_operands): Not here. (parse_input_constraint): No longer static. * tree.h: Declare it. * coverage.c (build_ctr_info_value): Use build_decl to make a VAR_DECL. (create_coverage): Likewise. java/ * parse.y (patch_assignment): Use make_node to create a BLOCK. * parse.h (BUILD_PTR_FROM_NAME): Use make_node to create a POINTER_TYPE. cp/ * tree.c (build_cplus_new): Use build_decl to create a VAR_DECL. (build_target_expr_with_type): Likewise. * pt.c (instantiate_class_template): Sanity check that our enclosing class has been instantiated. From-SVN: r72255 --- gcc/cp/pt.c | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) (limited to 'gcc/cp/pt.c') diff --git a/gcc/cp/pt.c b/gcc/cp/pt.c index f0dc0e1..909eede 100644 --- a/gcc/cp/pt.c +++ b/gcc/cp/pt.c @@ -5182,7 +5182,18 @@ instantiate_class_template (tree type) SET_ANON_AGGR_TYPE_P (type); pbinfo = TYPE_BINFO (pattern); - + +#ifdef ENABLE_CHECKING + if (DECL_CLASS_SCOPE_P (TYPE_MAIN_DECL (pattern)) + && ! COMPLETE_TYPE_P (TYPE_CONTEXT (type)) + && ! TYPE_BEING_DEFINED (TYPE_CONTEXT (type))) + /* We should never instantiate a nested class before its enclosing + class; we need to look up the nested class by name before we can + instantiate it, and that lookup should instantiate the enclosing + class. */ + abort (); +#endif + if (BINFO_BASETYPES (pbinfo)) { tree base_list = NULL_TREE; -- cgit v1.1