diff mbox

A couple of small C++ cleanup PATCHes

Message ID 4D8119BD.7000705@redhat.com
State New
Headers show

Commit Message

Jason Merrill March 16, 2011, 8:12 p.m. UTC
One more:  I noticed that we were calling require_complete_type within 
template-specific code, but in a template require_complete_type just 
returns immediately.

Tested x86_64-pc-linux-gnu, applying to trunk.
commit 453649bdbc1189503b34774d5a6cf2470a6bcd12
Author: Jason Merrill <jason@redhat.com>
Date:   Wed Mar 16 14:16:27 2011 -0400

    	* call.c (build_over_call): Remove require_complete_type_sfinae call.
diff mbox

Patch

diff --git a/gcc/cp/call.c b/gcc/cp/call.c
index 436c956..d040ec8 100644
--- a/gcc/cp/call.c
+++ b/gcc/cp/call.c
@@ -5994,8 +5994,6 @@  build_over_call (struct z_candidate *cand, int flags, tsubst_flags_t complain)
 				   argarray);
       if (TREE_THIS_VOLATILE (fn) && cfun)
 	current_function_returns_abnormally = 1;
-      if (!VOID_TYPE_P (return_type))
-	require_complete_type_sfinae (return_type, complain);
       return convert_from_reference (expr);
     }