This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [C++ Patch/RFC PR c++/57887 (and dups)
- From: Jason Merrill <jason at redhat dot com>
- To: Paolo Carlini <paolo dot carlini at oracle dot com>, "gcc-patches at gcc dot gnu dot org" <gcc-patches at gcc dot gnu dot org>
- Date: Thu, 14 Nov 2013 09:41:38 -0500
- Subject: Re: [C++ Patch/RFC PR c++/57887 (and dups)
- Authentication-results: sourceware.org; auth=none
- References: <5284C934 dot 9040006 at oracle dot com>
On 11/14/2013 07:59 AM, Paolo Carlini wrote:
/* Make sure that any template parameters are in scope. */
maybe_begin_member_template_processing (decl);
Hmm, it seems that we use this for non-template member functions of
template classes as well; I wonder when that happened. I guess we
should update the comment to reflect reality. And perhaps the name of
the function, though I lean slightly toward leaving that alone.
it seems clear to me that something very similar must be done for NSDMIs
too. Thus I prepared the below, which uses CLASSTYPE_TEMPLATE_INFO to
adapt the existing code in maybe_begin_member_template_processing. It
tests fine. How does it look?
I don't think we need a new parameter; just pass the FIELD_DECL into
maybe_end_member_template_processing and adjust it appropriately.
Also, call m_e_m_t_p from cp_parser_late_parsing_nsdmi rather than
cp_parser_class_specifier_1.
Jason