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] Handle TYPE_PACK_EXPANSION return in tsubst_exception_specification


On Sun, Nov 18, 2007 at 09:38:27AM -0500, Doug Gregor wrote:
> This little patch fixes PR 33509, a P2 ice-on-valid where we failed to
> handle the instantiation of exception specifications that involve
> parameter packs from multiple levels of template parameters. The fix
> is relatively simple; we just deal with the resulting
> TYPE_PACK_EXPANSION explicitly.
> 
> Tested i686-pc-linux-gnu; okay for mainline?
> 
> 2007-11-18  Douglas Gregor  <doug.gregor@gmail.com>
> 
> 	PR c++/33509
> 	* pt.c (tsubst_exception_specification): Handle substitutions into
> 	member templates, where tsubst_pack_expansion returns a
> 	TYPE_PACK_EXPANSION.
> 
> 2007-11-18  Douglas Gregor  <doug.gregor@gmail.com>
> 
> 	PR c++/33509
> 	* g++.dg/cpp0x/variadic-throw.C: New.

I think it would be good to add not only this valid testcase, but
the invalid one as well (i.e. one with
return S<0, 1, 2>::foo<0, 1> ();
rather than
return S<0, 1, 2>::foo<0, 1, 3> ();
) to make sure it doesn't ICE and issues some meaningful error
on invalid code.

	Jakub


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