This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [C++ PATCH] Handle TYPE_PACK_EXPANSION return in tsubst_exception_specification
- From: Jakub Jelinek <jakub at redhat dot com>
- To: Doug Gregor <doug dot gregor at gmail dot com>
- Cc: GCC Patches <gcc-patches at gcc dot gnu dot org>
- Date: Sun, 18 Nov 2007 15:01:31 -0500
- Subject: Re: [C++ PATCH] Handle TYPE_PACK_EXPANSION return in tsubst_exception_specification
- References: <24b520d20711180638l2d166ea1u4fb14b3a7cb51f03@mail.gmail.com>
- Reply-to: Jakub Jelinek <jakub at redhat dot com>
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