[RFC] PR c++/43206
H.J. Lu
hjl.tools@gmail.com
Fri Mar 26 03:22:00 GMT 2010
On Wed, Mar 24, 2010 at 3:34 PM, Dodji Seketeli <dodji@redhat.com> wrote:
> On Wed, Mar 24, 2010 at 02:49:19PM -0400, Jason Merrill wrote:
>> I suppose you'd need to make sure you're getting the right
>> level of parms, but that's certainly doable.
>
> Right. I looked for a function that would hand me the parms of a certain
> level but failed to find any. So I added a new one in the patch below.
>
> Tested on x86_64-unknown-linux-gnu against trunk.
>
> Dodji
>
> commit bde8ffcd8cd8b8c8307fa05275af820ac090cd06
> Author: Dodji Seketeli <dodji@redhat.com>
> Date: Thu Mar 4 18:42:20 2010 +0100
>
> Fix candidate for PR c++/43206
>
> gcc/cp/ChangeLog:
> PR c++/43206
> * cp-tree.h (get_template_parms_at_level): Declare ...
> * pt.c (get_template_parms_at_level): ... new function.
> * typeck.c (get_template_parms_of_dependent_type): If a template
> type parm's DECL_CONTEXT isn't yet set, get its siblings from
> current_template_parms. Use get_template_parms_at_level.
> (incompatible_dependent_types_p): If we get empty parms from just one
> of the template type parms we are comparing then the template parms are
> incompatible.
>
> gcc/testsuite/ChangeLog:
> PR c++/43206
> * g++.dg/template/typedef30.C: New test case.
>
It failed to bootstrap on Linux/ia32:
cc1: warnings being treated as errors
../../src-trunk/gcc/cp/pt.c: In function 'get_template_parms_at_level':
../../src-trunk/gcc/cp/pt.c:2851:16: error: comparison between signed
and unsigned integer expressions
../../src-trunk/gcc/cp/pt.c:2855:30: error: comparison between signed
and unsigned integer expressions
--
H.J.
More information about the Gcc-patches
mailing list