This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [C++ PATCH]: Fix 16174


Nathan Sidwell wrote:

Mark,
this patch fixes 16174, a recent regression.  I think it's a known SFINAE
failure that's newly exposed.

I've propagated the tf_error flag through complete_type and
instantiate_template_class.  I've also added a 'already tried this one'
flag to avoid repeated instantiation attempts.

I think this patch will make us SFINAE compliant up to the DR about
whether complicated things like call exprs can be used inside sizeof
inside a non-type template parm inside a return type instantiation (phew).


built and tested on 3.4 branch on i686-pc-linux-gnu, ok for there & HEAD?
I've built it on HEAD, but the current state is such that I don't know
what to expect of the testsuite.

I think this patch is OK, but I want to think about it a little bit.


I think we should leave complete_type (with its current parameters) around as a macro or forwarder function; that way the vast majority of callers will not have to be changed, and new uses will not have to add the extra parameter. That would also make it easier for me to see the meat of the patch here.

Thanks,

--
Mark Mitchell
CodeSourcery, LLC
(916) 791-8304
mark@codesourcery.com


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]