This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: C++ PATCH: Explicit instantiations of constructors
>>>>> "Jason" == Jason Merrill <jason@redhat.com> writes:
>> * pt.c (do_decl_instantiate): Explicitly clone constructors and
>> destructors that haven't already been cloned.
Jason> I don't think this should be necessary. Why aren't the
Jason> clone decls generated automatically generated along with
Jason> the cloned decl?
When you mean generated, what do you mean? Instantiated, declared,
etc.?
We don't necessarily reach instantiate_decl, because we could have the
`extern' extension. Doing the duplication in grokdeclarator seemed
ugly beyond belief.
I agree that I didn't find the fix to be the most pleasing thing
imaginable. :-) I'd fully welcome a better solution!
--
Mark Mitchell mark@codesourcery.com
CodeSourcery, LLC http://www.codesourcery.com