This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [c++-concepts] explicit instantiation and specialization
- From: Andrew Sutton <andrew dot n dot sutton at gmail dot com>
- To: Ed Smith-Rowland <3dw4rd at verizon dot net>
- Cc: gcc-patches <gcc-patches at gcc dot gnu dot org>, Jason Merrill <jason at redhat dot com>, Braden Obrzut <admin at maniacsvault dot net>
- Date: Fri, 15 Aug 2014 08:18:52 -0400
- Subject: Re: [c++-concepts] explicit instantiation and specialization
- Authentication-results: sourceware.org; auth=none
- References: <53EC0D51 dot 6090904 at verizon dot net> <CANq5Syu8hn=gQYZ-QAYY=j65KeekXYgo0WfPmQAU-s6kpU8fTg at mail dot gmail dot com>
Just committed this patch, fixing the bootstrap.
2014-08-13 Andrew Sutton <andrew.n.sutton@gmail.com>
Fix regression in bootstrap.
* gcc/cp/call.c (get_temploid): Removed. No longer called.
(joust): Remove unused variable declarations.
Andrew
On Wed, Aug 13, 2014 at 9:50 PM, Andrew Sutton
<andrew.n.sutton@gmail.com> wrote:
> Ah... sorry. Leftovers. I didn't have time to run a full bootstrap
> build before heading out for a few days. I'll try to get those out
> tomorrow afternoon-ish.
>
> Andrew
>
>
> On Wed, Aug 13, 2014 at 9:13 PM, Ed Smith-Rowland <3dw4rd@verizon.net> wrote:
>> I get build fail:
>>
>> ../../gcc_concepts/gcc/cp/call.c:8793:8: error: unused variable âm1â
>> [-Werror=unused-variable]
>> tree m1 = get_temploid (cand1);
>> ^
>> ../../gcc_concepts/gcc/cp/call.c:8794:8: error: unused variable âm2â
>> [-Werror=unused-variable]
>> tree m2 = get_temploid (cand2);
>> ^
>> cc1plus: all warnings being treated as errors
>>
>> Commenting the lines let the build finish.
>>
>> Ed
>>
Index: gcc/cp/call.c
===================================================================
--- gcc/cp/call.c (revision 213924)
+++ gcc/cp/call.c (working copy)
@@ -8755,24 +8755,6 @@ add_warning (struct z_candidate *winner,
winner->warnings = cw;
}
-// When a CANDidate function is a member function of a class template
-// specialization, return the temploid describing that function.
-// Returns NULL_TREE otherwise.
-static inline tree
-get_temploid (struct z_candidate *cand)
-{
- gcc_assert (cand);
- tree t = NULL_TREE;
- if (!cand->template_decl)
- {
- if (DECL_P (cand->fn) && DECL_USE_TEMPLATE (cand->fn))
- t = DECL_TI_TEMPLATE (cand->fn);
- if (t && TREE_CODE (t) == TEMPLATE_INFO)
- t = TI_TEMPLATE (t);
- }
- return t;
-}
-
/* Compare two candidates for overloading as described in
[over.match.best]. Return values:
@@ -8789,10 +8771,6 @@ joust (struct z_candidate *cand1, struct
size_t i;
size_t len;
- // Try to get a temploid describing each candidate.
- tree m1 = get_temploid (cand1);
- tree m2 = get_temploid (cand2);
-
/* Candidates that involve bad conversions are always worse than those
that don't. */
if (cand1->viable > cand2->viable)