Commit e7de2d6f by Jakub Jelinek Committed by Jakub Jelinek

re PR c++/34395 (Broken diagnostic: 'type_pack_expansion' not supported by dump_type_prefix/suffix)

	PR c++/34395
	* error.c (dump_type_prefix, dump_type_suffix): Handle
	TYPE_PACK_EXPANSION.

	* g++.dg/cpp0x/error1.C: New test.

From-SVN: r130745
parent 214452b9
2007-12-10 Jakub Jelinek <jakub@redhat.com>
PR c++/34395
* error.c (dump_type_prefix, dump_type_suffix): Handle
TYPE_PACK_EXPANSION.
PR c++/34394
* error.c (dump_expr): Handle ABS_EXPR.
......
......@@ -611,6 +611,7 @@ dump_type_prefix (tree t, int flags)
case VECTOR_TYPE:
case TYPEOF_TYPE:
case DECLTYPE_TYPE:
case TYPE_PACK_EXPANSION:
dump_type (t, flags);
pp_base (cxx_pp)->padding = pp_before;
break;
......@@ -708,6 +709,7 @@ dump_type_suffix (tree t, int flags)
case VECTOR_TYPE:
case TYPEOF_TYPE:
case DECLTYPE_TYPE:
case TYPE_PACK_EXPANSION:
break;
default:
......
2007-12-10 Jakub Jelinek <jakub@redhat.com>
PR c++/34395
* g++.dg/cpp0x/error1.C: New test.
PR c++/34394
* g++.dg/other/error22.C: New test.
// PR c++/34395
// { dg-do compile }
// { dg-options "-std=c++0x" }
template<int... N> void foo (int... x[N]) // { dg-error "int \\\[N\\\]\\.\\.\\. x" }
{
struct A
{
A () { x; } // { dg-error "use of parameter from containing function" }
};
}
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