[C++ PATCH] Handle TYPE_PACK_EXPANSION return in tsubst_exception_specification
Jakub Jelinek
jakub@redhat.com
Sun Nov 18 21:51:00 GMT 2007
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
More information about the Gcc-patches
mailing list