Re: [C++ Patch] PR 65370

2015-03-12 Thread Jason Merrill
On 03/10/2015 01:03 PM, Paolo Carlini wrote: Good question, but we don't have this issue, because for that we emit anyway: 65370.C:11:36: error: default argument specified in explicit specialization [-fpermissive] C::C(const C&, bool = false); nothing changes about that kind of testcase, usua

Re: [C++ Patch] PR 65370

2015-03-10 Thread Jason Merrill
OK. Jason

Re: [C++ Patch] PR 65370

2015-03-10 Thread Paolo Carlini
Hi, On 03/10/2015 07:10 PM, Jason Merrill wrote: Ah. So here we can ignore any template instantiation or specialization, with a comment that check_explicit_specialization will handle them. But I suspect that checking the decl itself will be better; I would expect checking the context to lead

Re: [C++ Patch] PR 65370

2015-03-10 Thread Paolo Carlini
... in any case, I can confirm that the below also passes testing. Not sure if it makes sense to add the check also to the other call site, can't figure out a testcase... Thanks, Paolo. / Index: cp/decl.c === --- c

Re: [C++ Patch] PR 65370

2015-03-10 Thread Paolo Carlini
Hi, On 03/10/2015 05:19 PM, Jason Merrill wrote: On 03/10/2015 11:50 AM, Paolo Carlini wrote: + /* Don't get fooled by, eg: + + template class C + { + template + C(const C&, bool = false); + }; + + template <> + template + C::C(const C&, bool); */ + + i

Re: [C++ Patch] PR 65370

2015-03-10 Thread Jason Merrill
On 03/10/2015 11:50 AM, Paolo Carlini wrote: + /* Don't get fooled by, eg: + + template class C + { + template + C(const C&, bool = false); + }; + + template <> + template + C::C(const C&, bool); */ + + if (DECL_FUNCTION_MEMBER_P (decl) + && CLASSTYP