From: Jakub Jelinek Date: Mon, 10 Dec 2007 14:38:05 +0000 (+0100) Subject: re PR c++/34395 (Broken diagnostic: 'type_pack_expansion' not supported by dump_type_... X-Git-Tag: releases/gcc-4.3.0~1119 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=e7de2d6f6923f1da5a652406a9d49b958216a0ee;p=thirdparty%2Fgcc.git 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 --- diff --git a/gcc/cp/ChangeLog b/gcc/cp/ChangeLog index ee732365d923..635c6973efee 100644 --- a/gcc/cp/ChangeLog +++ b/gcc/cp/ChangeLog @@ -1,5 +1,9 @@ 2007-12-10 Jakub Jelinek + 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. diff --git a/gcc/cp/error.c b/gcc/cp/error.c index 2ad74ba25284..285d4fe037ad 100644 --- a/gcc/cp/error.c +++ b/gcc/cp/error.c @@ -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: diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog index 8a3e532cf701..120d026df2f8 100644 --- a/gcc/testsuite/ChangeLog +++ b/gcc/testsuite/ChangeLog @@ -1,5 +1,8 @@ 2007-12-10 Jakub Jelinek + PR c++/34395 + * g++.dg/cpp0x/error1.C: New test. + PR c++/34394 * g++.dg/other/error22.C: New test. diff --git a/gcc/testsuite/g++.dg/cpp0x/error1.C b/gcc/testsuite/g++.dg/cpp0x/error1.C new file mode 100644 index 000000000000..751b3b75e0cb --- /dev/null +++ b/gcc/testsuite/g++.dg/cpp0x/error1.C @@ -0,0 +1,11 @@ +// PR c++/34395 +// { dg-do compile } +// { dg-options "-std=c++0x" } + +template void foo (int... x[N]) // { dg-error "int \\\[N\\\]\\.\\.\\. x" } +{ + struct A + { + A () { x; } // { dg-error "use of parameter from containing function" } + }; +}