Patchwork Remove unused tf_no_class_instantiations enum member

login
register
mail settings
Submitter Dodji Seketeli
Date Nov. 2, 2010, 9:04 p.m.
Message ID <m3vd4f5te6.fsf@redhat.com>
Download mbox | patch
Permalink /patch/69924/
State New
Headers show

Comments

Dodji Seketeli - Nov. 2, 2010, 9:04 p.m.
Hello,

This (obvious) patch removes the unused tf_no_class_instantiations enum
member that I noticed while working on another patch.

OK to commit to trunk?

commit d9068b6943761063d7d6cc3af8debefcded37aaa
Author: Dodji Seketeli <dodji@seketeli.org>
Date:   Tue Nov 2 22:00:29 2010 +0100

    Remove unused tf_no_class_instantiations enum member
    
    gcc/cp/ChangeLog:
    	* cp-tree.h (enum tsubst_flags)<tf_no_class_instantiations>:
    	Remove.
    	* pt.c (tsubst): Remove the use of tf_no_class_instantiations.
Jason Merrill - Nov. 3, 2010, 1:20 p.m.
OK.

Jason

Patch

diff --git a/gcc/cp/cp-tree.h b/gcc/cp/cp-tree.h
index b46959b..fc4772d 100644
--- a/gcc/cp/cp-tree.h
+++ b/gcc/cp/cp-tree.h
@@ -3960,8 +3960,6 @@  enum tsubst_flags {
 				    conversion.  */
   tf_no_access_control = 1 << 7, /* Do not perform access checks, even
 				    when issuing other errors.   */
-  /* Do not instantiate classes (used by count_non_default_template_args). */
-  tf_no_class_instantiations = 1 << 8,
   /* Convenient substitution flags combinations.  */
   tf_warning_or_error = tf_warning | tf_error
 };
diff --git a/gcc/cp/pt.c b/gcc/cp/pt.c
index 21366d9..ca2baeb 100644
--- a/gcc/cp/pt.c
+++ b/gcc/cp/pt.c
@@ -10878,8 +10878,7 @@  tsubst (tree t, tree args, tsubst_flags_t complain, tree in_decl)
 	       But, such constructs have already been resolved by this
 	       point, so here CTX really should have complete type, unless
 	       it's a partial instantiation.  */
-	    if (!(complain & tf_no_class_instantiations))
-	      ctx = complete_type (ctx);
+	    ctx = complete_type (ctx);
 	    if (!COMPLETE_TYPE_P (ctx))
 	      {
 		if (complain & tf_error)