Regarding bug 32505

ori bar
Thu Jul 12 19:08:00 GMT 2007

I've been wanting to contribute code to gcc, but since i don't know it
too much i thought of starting from this bug (which, btw recreates on
my machine with gcc 4.2).

I've found out this bug and begun working it.

I've started writing code in maybe_process_partial_specialization
after push_template_decl.

My current idea for how to solve the bug is as following:

First, i need to run on DECL_TEMPLATE_INSTANTIATIONS (for each tree in
there i should also check that it is an INSTANTIATON and not a
SPEICALIZATION) of the most_general_template from which this template
has been instantiated.

For each instantiation, i need to somehow check two things:
1) Can it be instantiated from the newly created partial specialization?
2) Is the partial specialization more specific than the one from which
the instantiation has already been implemented.

My question is, how can i find out from which template the existing
instantiation has been made?
>From the check i've made, i think that CLASSTYPE_TI_TEMPLATE always
give the most general template, and not it's partial specializations.
Is there any way for me to get it?
I've tried doing something using most_specialized_class (not
successful) and I believe that it may work too, but it may be less

I hope I'm sending this to the right people, have a nice day and
thanks in advance.
1110101111111110 - it's a way of life

More information about the Gcc mailing list