[C++ Patch] Fix pastos (?) in make_typename_type calls

Paolo Carlini paolo.carlini@oracle.com
Tue Jul 24 14:24:00 GMT 2012


Hi,

while looking into the re-opened c++/51213 (doesn't seem trivial: 
details soon, I hope) I noticed things which look like old pastos: in 
convert_template_argument and tsubst we are computing complain & 
tf_error for the - tsubst_flags_t, not bool - fourth argument of 
make_typename_type. That doesn't make much sense to me and the below, 
as-is, passes testing.

Thanks,
Paolo.

///////////////////////////
-------------- next part --------------
2012-07-24  Paolo Carlini  <paolo.carlini@oracle.com>

	* pt.c (convert_template_argument, tsubst): Fix pasto in the fourth
	argument to make_typename_type (complain & tf_error -> complain).

-------------- next part --------------
Index: pt.c
===================================================================
--- pt.c	(revision 189808)
+++ pt.c	(working copy)
@@ -6139,7 +6139,7 @@ convert_template_argument (tree parm,
       orig_arg = make_typename_type (TREE_OPERAND (arg, 0),
 				     TREE_OPERAND (arg, 1),
 				     typename_type,
-				     complain & tf_error);
+				     complain);
       arg = orig_arg;
       is_type = 1;
     }
@@ -11402,7 +11402,7 @@ tsubst (tree t, tree args, tsubst_flags_t complain
 	  }
 
 	f = make_typename_type (ctx, f, typename_type,
-				(complain & tf_error) | tf_keep_type_decl);
+				complain | tf_keep_type_decl);
 	if (f == error_mark_node)
 	  return f;
 	if (TREE_CODE (f) == TYPE_DECL)


More information about the Gcc-patches mailing list