]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
re PR c++/34395 (Broken diagnostic: 'type_pack_expansion' not supported by dump_type_...
authorJakub Jelinek <jakub@redhat.com>
Mon, 10 Dec 2007 14:38:05 +0000 (15:38 +0100)
committerJakub Jelinek <jakub@gcc.gnu.org>
Mon, 10 Dec 2007 14:38:05 +0000 (15:38 +0100)
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

gcc/cp/ChangeLog
gcc/cp/error.c
gcc/testsuite/ChangeLog
gcc/testsuite/g++.dg/cpp0x/error1.C [new file with mode: 0644]

index ee732365d923305387f11fab943616042d6fcaf2..635c6973efeede4dd4315f006eb1b07b9a837d18 100644 (file)
@@ -1,5 +1,9 @@
 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.
 
index 2ad74ba252848bafd1cf6d48a964401b9656bf69..285d4fe037adbf676998d453c56b2dcd2a8bea24 100644 (file)
@@ -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:
index 8a3e532cf701a2339bb57de4b8deca0db569826f..120d026df2f878b934b7028e1e6b53843bd69f89 100644 (file)
@@ -1,5 +1,8 @@
 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.
 
diff --git a/gcc/testsuite/g++.dg/cpp0x/error1.C b/gcc/testsuite/g++.dg/cpp0x/error1.C
new file mode 100644 (file)
index 0000000..751b3b7
--- /dev/null
@@ -0,0 +1,11 @@
+// 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" }
+  };
+}