aboutsummaryrefslogtreecommitdiff
path: root/gcc/cp/pt.c
diff options
context:
space:
mode:
authorJason Merrill <jason@redhat.com>2003-10-09 01:44:57 -0400
committerJason Merrill <jason@gcc.gnu.org>2003-10-09 01:44:57 -0400
commit1456deafd7978b7201704ac822231c9ac4f260fe (patch)
tree4afd5b15eb7fe41b0e949cd004d55cb26834adbf /gcc/cp/pt.c
parent08cffcce0f0569711be8949bbaf579a54264b9ce (diff)
downloadgcc-1456deafd7978b7201704ac822231c9ac4f260fe.zip
gcc-1456deafd7978b7201704ac822231c9ac4f260fe.tar.gz
gcc-1456deafd7978b7201704ac822231c9ac4f260fe.tar.bz2
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
Diffstat (limited to 'gcc/cp/pt.c')
-rw-r--r--gcc/cp/pt.c13
1 files changed, 12 insertions, 1 deletions
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;