Commit 89a27d8f by Jason Merrill Committed by Jason Merrill

re PR c++/49420 ([C++0x] compiler segfault using result_of)

	PR c++/49420
	* error.c (dump_template_argument): Don't try to omit default
	template args from an argument pack.

From-SVN: r175117
parent 361b51c0
2011-06-16 Jason Merrill <jason@redhat.com>
PR c++/49420
* error.c (dump_template_argument): Don't try to omit default
template args from an argument pack.
2011-06-15 H.J. Lu <hongjiu.lu@intel.com>
PR c++/49412
......
......@@ -147,7 +147,9 @@ static void
dump_template_argument (tree arg, int flags)
{
if (ARGUMENT_PACK_P (arg))
dump_template_argument_list (ARGUMENT_PACK_ARGS (arg), flags);
dump_template_argument_list (ARGUMENT_PACK_ARGS (arg),
/* No default args in argument packs. */
flags|TFF_NO_OMIT_DEFAULT_TEMPLATE_ARGUMENTS);
else if (TYPE_P (arg) || TREE_CODE (arg) == TEMPLATE_DECL)
dump_type (arg, flags & ~TFF_CLASS_KEY_OR_ENUM);
else
......
2011-06-16 Jason Merrill <jason@redhat.com>
PR c++/49420
* g++.dg/cpp0x/variadic112.C: New.
2011-06-16 Jeff Law <law@redhat.com>
* gcc.dg/builtin-object-size-1.c: Update to handle chances from
......
// PR c++/49420
// { dg-options -std=c++0x }
struct A { };
template <class T> struct B
{
typedef typename T::type type ; // { dg-error "no type" }
};
template <typename Array, typename... Args>
typename B<Array>::type
get(const Array& a, Args... args);
int main()
{
A a;
int x = get(a, 1, 2, 3); // { dg-error "no match" }
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment