From patchwork Wed Mar 16 20:12:45 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: A couple of small C++ cleanup PATCHes From: Jason Merrill X-Patchwork-Id: 87299 Message-Id: <4D8119BD.7000705@redhat.com> To: gcc-patches List Date: Wed, 16 Mar 2011 16:12:45 -0400 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 Date: Wed Mar 16 14:16:27 2011 -0400 * call.c (build_over_call): Remove require_complete_type_sfinae call. 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); }