Hi!

On Fri, Jun 30, 2017 at 03:44:50PM -0400, Jason Merrill wrote:
> Well, the term "structured binding" refers to one of the names
> declared by the declaration, not the declaration as a whole, and those
> errors refer to the latter.  We could change "cannot be declared" to
> something else, perhaps just drop the "declared", so e.g. "structured
> binding declaration cannot be %<constexpr%>"?  Or "cannot use X
> specifier"?

So like this?
I've used cannot be %<...%>.
For types where it used to be previously
decomposition declaration cannot be declared with type
I'm using
structured binding declaration cannot have type
(not sure if you have other preference in that case).

2017-07-03  Jakub Jelinek  <ja...@redhat.com>

        * parser.c (cp_parser_decomposition_declaration): Replace
        decomposition declaration with structured binding in diagnostics.
        * decl.c (cp_finish_decomp): Likewise.
        (grokdeclarator): Likewise.

        * g++.dg/cpp1z/decomp1.C: Expect structured binding instead of
        decomposition declaration in diagnostics.
        * g++.dg/cpp1z/decomp2.C: Likewise.
        * g++.dg/cpp1z/decomp3.C: Likewise.
        * g++.dg/cpp1z/decomp4.C: Likewise.
        * g++.dg/cpp1z/decomp5.C: Likewise.
        * g++.dg/cpp1z/decomp6.C: Likewise.
        * g++.dg/cpp1z/decomp7.C: Likewise.
        * g++.dg/cpp1z/decomp8.C: Likewise.
        * g++.dg/cpp1z/decomp13.C: Likewise.
        * g++.dg/cpp1z/decomp14.C: Likewise.
        * g++.dg/cpp1z/decomp18.C: Likewise.
        * g++.dg/cpp1z/decomp19.C: Likewise.
        * g++.dg/cpp1z/decomp22.C: Likewise.
        * g++.dg/cpp1z/decomp23.C: Likewise.
        * g++.dg/cpp1z/decomp24.C: Likewise.
        * g++.dg/cpp1z/decomp25.C: Likewise.
        * g++.dg/cpp1z/decomp26.C: Likewise.
        * g++.dg/cpp1z/decomp28.C: Likewise.

--- gcc/cp/parser.c.jj  2017-07-03 17:40:13.292479327 +0200
+++ gcc/cp/parser.c     2017-07-03 17:51:20.389823434 +0200
@@ -13150,7 +13150,7 @@ cp_parser_decomposition_declaration (cp_
     }
 
   if (cxx_dialect < cxx1z)
-    pedwarn (loc, 0, "decomposition declaration only available with "
+    pedwarn (loc, 0, "structured bindings only available with "
                     "-std=c++1z or -std=gnu++1z");
 
   tree pushed_scope;
@@ -13199,7 +13199,7 @@ cp_parser_decomposition_declaration (cp_
 
   if (v.is_empty ())
     {
-      error_at (loc, "empty decomposition declaration");
+      error_at (loc, "empty structured binding declaration");
       decl = error_mark_node;
     }
 
--- gcc/cp/decl.c.jj    2017-06-30 16:51:54.054985468 +0200
+++ gcc/cp/decl.c       2017-07-03 17:51:57.013383043 +0200
@@ -7486,8 +7486,8 @@ cp_finish_decomp (tree decl, tree first,
 
          if (init == error_mark_node || eltype == error_mark_node)
            {
-             inform (dloc, "in initialization of decomposition variable %qD",
-                     v[i]);
+             inform (dloc, "in initialization of structured binding "
+                     "variable %qD", v[i]);
              goto error_out;
            }
          /* Save the decltype away before reference collapse.  */
@@ -10135,7 +10135,7 @@ grokdeclarator (const cp_declarator *dec
          break;
 
        case cdk_decomp:
-         name = "decomposition";
+         name = "structured binding";
          break;
 
        case cdk_error:
@@ -10589,43 +10589,43 @@ grokdeclarator (const cp_declarator *dec
                        ? declarator->declarator->id_loc : declarator->id_loc);
       if (inlinep)
        error_at (declspecs->locations[ds_inline],
-                 "decomposition declaration cannot be declared %<inline%>");
+                 "structured binding declaration cannot be %<inline%>");
       if (typedef_p)
        error_at (declspecs->locations[ds_typedef],
-                 "decomposition declaration cannot be declared %<typedef%>");
+                 "structured binding declaration cannot be %<typedef%>");
       if (constexpr_p)
-       error_at (declspecs->locations[ds_constexpr], "decomposition "
-                 "declaration cannot be declared %<constexpr%>");
+       error_at (declspecs->locations[ds_constexpr], "structured "
+                 "binding declaration cannot be %<constexpr%>");
       if (thread_p)
        error_at (declspecs->locations[ds_thread],
-                 "decomposition declaration cannot be declared %qs",
+                 "structured binding declaration cannot be %qs",
                  declspecs->gnu_thread_keyword_p
                  ? "__thread" : "thread_local");
       if (concept_p)
        error_at (declspecs->locations[ds_concept],
-                 "decomposition declaration cannot be declared %<concept%>");
+                 "structured binding declaration cannot be %<concept%>");
       switch (storage_class)
        {
        case sc_none:
          break;
        case sc_register:
-         error_at (loc, "decomposition declaration cannot be declared "
+         error_at (loc, "structured binding declaration cannot be "
                    "%<register%>");
          break;
        case sc_static:
-         error_at (loc, "decomposition declaration cannot be declared "
+         error_at (loc, "structured binding declaration cannot be "
                    "%<static%>");
          break;
        case sc_extern:
-         error_at (loc, "decomposition declaration cannot be declared "
+         error_at (loc, "structured binding declaration cannot be "
                    "%<extern%>");
          break;
        case sc_mutable:
-         error_at (loc, "decomposition declaration cannot be declared "
+         error_at (loc, "structured binding declaration cannot be "
                    "%<mutable%>");
          break;
        case sc_auto:
-         error_at (loc, "decomposition declaration cannot be declared "
+         error_at (loc, "structured binding declaration cannot be "
                    "C++98 %<auto%>");
          break;
        default:
@@ -10636,8 +10636,8 @@ grokdeclarator (const cp_declarator *dec
        {
          if (type != error_mark_node)
            {
-             error_at (loc, "decomposition declaration cannot be declared "
-                       "with type %qT", type);
+             error_at (loc, "structured binding declaration cannot have "
+                       "type %qT", type);
              inform (loc,
                      "type must be cv-qualified %<auto%> or reference to "
                      "cv-qualified %<auto%>");
--- gcc/testsuite/g++.dg/cpp1z/decomp1.C.jj     2017-06-30 16:46:54.492562687 
+0200
+++ gcc/testsuite/g++.dg/cpp1z/decomp1.C        2017-07-03 17:51:20.410823181 
+0200
@@ -7,10 +7,10 @@ struct S { int a; signed char b; float c
 int
 main ()
 {
-  auto & [ c, d ] = a;         // { dg-warning "decomposition declaration only 
available with" "" { target c++14_down } }
-  auto [ e, f ] = a;           // { dg-warning "decomposition declaration only 
available with" "" { target c++14_down } }
-  auto [ g, h, i ] = s;                // { dg-warning "decomposition 
declaration only available with" "" { target c++14_down } }
-  auto & [ j, k, l ] = s;      // { dg-warning "decomposition declaration only 
available with" "" { target c++14_down } }
+  auto & [ c, d ] = a;         // { dg-warning "structured bindings only 
available with" "" { target c++14_down } }
+  auto [ e, f ] = a;           // { dg-warning "structured bindings only 
available with" "" { target c++14_down } }
+  auto [ g, h, i ] = s;                // { dg-warning "structured bindings 
only available with" "" { target c++14_down } }
+  auto & [ j, k, l ] = s;      // { dg-warning "structured bindings only 
available with" "" { target c++14_down } }
   c++;
   d++;
   e += 6;
--- gcc/testsuite/g++.dg/cpp1z/decomp2.C.jj     2017-06-30 16:46:54.594561469 
+0200
+++ gcc/testsuite/g++.dg/cpp1z/decomp2.C        2017-07-03 17:51:20.411823169 
+0200
@@ -9,12 +9,12 @@ __complex__ int c = 7 + 8i;
 int
 main ()
 {
-  auto & [ d, e, f, g ] = a;   // { dg-warning "decomposition declaration only 
available with" "" { target c++14_down } }
-  auto [ h, i, j, k ] = a;     // { dg-warning "decomposition declaration only 
available with" "" { target c++14_down } }
-  auto [ l, m ] = b;           // { dg-warning "decomposition declaration only 
available with" "" { target c++14_down } }
-  auto & [ n, o ] = b;         // { dg-warning "decomposition declaration only 
available with" "" { target c++14_down } }
-  auto & [ p, q ] = c;         // { dg-warning "decomposition declaration only 
available with" "" { target c++14_down } }
-  auto [ r, s ] = c;           // { dg-warning "decomposition declaration only 
available with" "" { target c++14_down } }
+  auto & [ d, e, f, g ] = a;   // { dg-warning "structured bindings only 
available with" "" { target c++14_down } }
+  auto [ h, i, j, k ] = a;     // { dg-warning "structured bindings only 
available with" "" { target c++14_down } }
+  auto [ l, m ] = b;           // { dg-warning "structured bindings only 
available with" "" { target c++14_down } }
+  auto & [ n, o ] = b;         // { dg-warning "structured bindings only 
available with" "" { target c++14_down } }
+  auto & [ p, q ] = c;         // { dg-warning "structured bindings only 
available with" "" { target c++14_down } }
+  auto [ r, s ] = c;           // { dg-warning "structured bindings only 
available with" "" { target c++14_down } }
   d += 10;
   e += 11;
   f += 12;
--- gcc/testsuite/g++.dg/cpp1z/decomp3.C.jj     2017-06-30 16:46:54.692560299 
+0200
+++ gcc/testsuite/g++.dg/cpp1z/decomp3.C        2017-07-03 17:51:20.432822917 
+0200
@@ -9,36 +9,36 @@ B baz ();
 void
 test (A &b, B c)
 {
-  int && [ d ] = c;                    // { dg-error "decomposition 
declaration cannot be declared with type 'int'" }
-                                       // { dg-warning "decomposition 
declaration only available with -std=c..1z or -std=gnu..1z" "" { target 
c++14_down } .-1 }
-  char & [ e, f, ff ] { b };           // { dg-error "decomposition 
declaration cannot be declared with type 'char'" }
-                                       // { dg-warning "decomposition 
declaration only available with -std=c..1z or -std=gnu..1z" "" { target 
c++14_down } .-1 }
-  auto&[g,h,i]=b;                      // { dg-warning "decomposition 
declaration only available with -std=c..1z or -std=gnu..1z" "" { target 
c++14_down } }
-  decltype (auto) [ j ] = c;           // { dg-error "decomposition 
declaration cannot be declared with type 'decltype.auto.'" "" { target c++14 } }
-                                       // { dg-warning "decomposition 
declaration only available with -std=c..1z or -std=gnu..1z" "" { target 
c++14_down } .-1 }
+  int && [ d ] = c;                    // { dg-error "structured binding 
declaration cannot have type 'int'" }
+                                       // { dg-warning "structured bindings 
only available with -std=c..1z or -std=gnu..1z" "" { target c++14_down } .-1 }
+  char & [ e, f, ff ] { b };           // { dg-error "structured binding 
declaration cannot have type 'char'" }
+                                       // { dg-warning "structured bindings 
only available with -std=c..1z or -std=gnu..1z" "" { target c++14_down } .-1 }
+  auto&[g,h,i]=b;                      // { dg-warning "structured bindings 
only available with -std=c..1z or -std=gnu..1z" "" { target c++14_down } }
+  decltype (auto) [ j ] = c;           // { dg-error "structured binding 
declaration cannot have type 'decltype.auto.'" "" { target c++14 } }
+                                       // { dg-warning "structured bindings 
only available with -std=c..1z or -std=gnu..1z" "" { target c++14_down } .-1 }
                                        // { dg-error "expected 
primary-expression before 'decltype'" "" { target c++11_down } .-2 }
   auto & & && & [ m, n, o ] = b;       // { dg-error "multiple ref-qualifiers" 
}
-                                       // { dg-warning "decomposition 
declaration only available with -std=c..1z or -std=gnu..1z" "" { target 
c++14_down } .-1 }
-  constexpr auto [ p ] = c;            // { dg-error "decomposition 
declaration cannot be declared 'constexpr'" }
-                                       // { dg-warning "decomposition 
declaration only available with -std=c..1z or -std=gnu..1z" "" { target 
c++14_down } .-1 }
+                                       // { dg-warning "structured bindings 
only available with -std=c..1z or -std=gnu..1z" "" { target c++14_down } .-1 }
+  constexpr auto [ p ] = c;            // { dg-error "structured binding 
declaration cannot be 'constexpr'" }
+                                       // { dg-warning "structured bindings 
only available with -std=c..1z or -std=gnu..1z" "" { target c++14_down } .-1 }
   friend auto [ q ] = c;               // { dg-error "'friend' used outside of 
class" }
-                                       // { dg-warning "decomposition 
declaration only available with -std=c..1z or -std=gnu..1z" "" { target 
c++14_down } .-1 }
-  typedef auto [ r ] = c;              // { dg-error "decomposition 
declaration cannot be declared 'typedef'" }
-                                       // { dg-warning "decomposition 
declaration only available with -std=c..1z or -std=gnu..1z" "" { target 
c++14_down } .-1 }
-  inline auto [ s ] = c;               // { dg-error "decomposition 
declaration cannot be declared 'inline'" }
-                                       // { dg-warning "decomposition 
declaration only available with -std=c..1z or -std=gnu..1z" "" { target 
c++14_down } .-1 }
+                                       // { dg-warning "structured bindings 
only available with -std=c..1z or -std=gnu..1z" "" { target c++14_down } .-1 }
+  typedef auto [ r ] = c;              // { dg-error "structured binding 
declaration cannot be 'typedef'" }
+                                       // { dg-warning "structured bindings 
only available with -std=c..1z or -std=gnu..1z" "" { target c++14_down } .-1 }
+  inline auto [ s ] = c;               // { dg-error "structured binding 
declaration cannot be 'inline'" }
+                                       // { dg-warning "structured bindings 
only available with -std=c..1z or -std=gnu..1z" "" { target c++14_down } .-1 }
   __restrict auto [ t ] = c;           // { dg-error "invalid use of 
'restrict'" }
-                                       // { dg-warning "decomposition 
declaration only available with -std=c..1z or -std=gnu..1z" "" { target 
c++14_down } .-1 }
-  long long auto [ u ] = c;            // { dg-error "'long long' invalid for 
'decomposition'" }
-                                       // { dg-warning "decomposition 
declaration only available with -std=c..1z or -std=gnu..1z" "" { target 
c++14_down } .-1 }
+                                       // { dg-warning "structured bindings 
only available with -std=c..1z or -std=gnu..1z" "" { target c++14_down } .-1 }
+  long long auto [ u ] = c;            // { dg-error "'long long' invalid for 
'structured binding'" }
+                                       // { dg-warning "structured bindings 
only available with -std=c..1z or -std=gnu..1z" "" { target c++14_down } .-1 }
   virtual auto [ v ] = c;              // { dg-error "'virtual' outside class 
declaration" }
-                                       // { dg-warning "decomposition 
declaration only available with -std=c..1z or -std=gnu..1z" "" { target 
c++14_down } .-1 }
+                                       // { dg-warning "structured bindings 
only available with -std=c..1z or -std=gnu..1z" "" { target c++14_down } .-1 }
   explicit auto [ w ] = c;             // { dg-error "'explicit' outside class 
declaration" }
-                                       // { dg-warning "decomposition 
declaration only available with -std=c..1z or -std=gnu..1z" "" { target 
c++14_down } .-1 }
-  static auto [ x ] = c;               // { dg-error "decomposition 
declaration cannot be declared 'static'" }
-                                       // { dg-warning "decomposition 
declaration only available with -std=c..1z or -std=gnu..1z" "" { target 
c++14_down } .-1 }
-  extern auto [ y ] { c };             // { dg-error "decomposition 
declaration cannot be declared 'extern'" }
-                                       // { dg-warning "decomposition 
declaration only available with -std=c..1z or -std=gnu..1z" "" { target 
c++14_down } .-1 }
+                                       // { dg-warning "structured bindings 
only available with -std=c..1z or -std=gnu..1z" "" { target c++14_down } .-1 }
+  static auto [ x ] = c;               // { dg-error "structured binding 
declaration cannot be 'static'" }
+                                       // { dg-warning "structured bindings 
only available with -std=c..1z or -std=gnu..1z" "" { target c++14_down } .-1 }
+  extern auto [ y ] { c };             // { dg-error "structured binding 
declaration cannot be 'extern'" }
+                                       // { dg-warning "structured bindings 
only available with -std=c..1z or -std=gnu..1z" "" { target c++14_down } .-1 }
 }
 
 void
@@ -52,15 +52,15 @@ void
 test3 (A &b, B c)
 {
   auto [ d, e, f ] = arr;              // { dg-error "only 3 names provided 
while 'int .4.' decomposes into 4 elements" }
-                                       // { dg-warning "decomposition 
declaration only available with -std=c..1z or -std=gnu..1z" "" { target 
c++14_down } .-1 }
+                                       // { dg-warning "structured bindings 
only available with -std=c..1z or -std=gnu..1z" "" { target c++14_down } .-1 }
   auto & [ g, h, i, j, k ] = arr;      // { dg-error "5 names provided while 
'int .4.' decomposes into 4 elements" }
-                                       // { dg-warning "decomposition 
declaration only available with -std=c..1z or -std=gnu..1z" "" { target 
c++14_down } .-1 }
+                                       // { dg-warning "structured bindings 
only available with -std=c..1z or -std=gnu..1z" "" { target c++14_down } .-1 }
   auto [ l, m ] = b;                   // { dg-error "only 2 names provided 
while 'A' decomposes into 3 elements" }
-                                       // { dg-warning "decomposition 
declaration only available with -std=c..1z or -std=gnu..1z" "" { target 
c++14_down } .-1 }
+                                       // { dg-warning "structured bindings 
only available with -std=c..1z or -std=gnu..1z" "" { target c++14_down } .-1 }
   auto & [ n, o, p, q ] = b;           // { dg-error "4 names provided while 
'A' decomposes into 3 elements" }
-                                       // { dg-warning "decomposition 
declaration only available with -std=c..1z or -std=gnu..1z" "" { target 
c++14_down } .-1 }
-  auto [] { c };                       // { dg-error "empty decomposition 
declaration" }
-                                       // { dg-warning "decomposition 
declaration only available with -std=c..1z or -std=gnu..1z" "" { target 
c++14_down } .-1 }
+                                       // { dg-warning "structured bindings 
only available with -std=c..1z or -std=gnu..1z" "" { target c++14_down } .-1 }
+  auto [] { c };                       // { dg-error "empty structured binding 
declaration" }
+                                       // { dg-warning "structured bindings 
only available with -std=c..1z or -std=gnu..1z" "" { target c++14_down } .-1 }
   auto [ r, s ] = c;                   // { dg-error "2 names provided while 
'B' decomposes into 1 elements" }
-                                       // { dg-warning "decomposition 
declaration only available with -std=c..1z or -std=gnu..1z" "" { target 
c++14_down } .-1 }
+                                       // { dg-warning "structured bindings 
only available with -std=c..1z or -std=gnu..1z" "" { target c++14_down } .-1 }
 }
--- gcc/testsuite/g++.dg/cpp1z/decomp4.C.jj     2017-06-30 16:46:54.750559606 
+0200
+++ gcc/testsuite/g++.dg/cpp1z/decomp4.C        2017-07-03 17:51:20.432822917 
+0200
@@ -15,18 +15,18 @@ void
 test (A &a, B &b, C &c, D &d, E &e, F &f, G &g, H &h, I &i)
 {
   auto [ j ] = a;                      // { dg-error "cannot decompose class 
type 'A' because it has an anonymous struct member" }
-                                       // { dg-warning "decomposition 
declaration only available with -std=c..1z or -std=gnu..1z" "" { target 
c++14_down } .-1 }
+                                       // { dg-warning "structured bindings 
only available with -std=c..1z or -std=gnu..1z" "" { target c++14_down } .-1 }
   auto [ k ] { b };                    // { dg-error "cannot decompose class 
type 'B' because it has an anonymous union member" }
-                                       // { dg-warning "decomposition 
declaration only available with -std=c..1z or -std=gnu..1z" "" { target 
c++14_down } .-1 }
+                                       // { dg-warning "structured bindings 
only available with -std=c..1z or -std=gnu..1z" "" { target c++14_down } .-1 }
   auto [ l, l2 ] = c;                  // { dg-error "cannot decompose 
non-public member 'C::b' of 'C'" }
-                                       // { dg-warning "decomposition 
declaration only available with -std=c..1z or -std=gnu..1z" "" { target 
c++14_down } .-1 }
-  auto [ m ] = d;                      // { dg-warning "decomposition 
declaration only available with -std=c..1z or -std=gnu..1z" "" { target 
c++14_down } }
+                                       // { dg-warning "structured bindings 
only available with -std=c..1z or -std=gnu..1z" "" { target c++14_down } .-1 }
+  auto [ m ] = d;                      // { dg-warning "structured bindings 
only available with -std=c..1z or -std=gnu..1z" "" { target c++14_down } }
   auto [ n ] { e };                    // { dg-error "cannot decompose 
non-public member 'E::a' of 'E'" }
-                                       // { dg-warning "decomposition 
declaration only available with -std=c..1z or -std=gnu..1z" "" { target 
c++14_down } .-1 }
-  auto [ o ] { f };                    // { dg-warning "decomposition 
declaration only available with -std=c..1z or -std=gnu..1z" "" { target 
c++14_down } }
+                                       // { dg-warning "structured bindings 
only available with -std=c..1z or -std=gnu..1z" "" { target c++14_down } .-1 }
+  auto [ o ] { f };                    // { dg-warning "structured bindings 
only available with -std=c..1z or -std=gnu..1z" "" { target c++14_down } }
   auto & [ p ] { g };                  // { dg-error "cannot decompose class 
type 'G': both it and its base class 'F' have non-static data members" }
-                                       // { dg-warning "decomposition 
declaration only available with -std=c..1z or -std=gnu..1z" "" { target 
c++14_down } .-1 }
-  auto [ q ] { h };                    // { dg-warning "decomposition 
declaration only available with -std=c..1z or -std=gnu..1z" "" { target 
c++14_down } }
+                                       // { dg-warning "structured bindings 
only available with -std=c..1z or -std=gnu..1z" "" { target c++14_down } .-1 }
+  auto [ q ] { h };                    // { dg-warning "structured bindings 
only available with -std=c..1z or -std=gnu..1z" "" { target c++14_down } }
   auto [ r ] { i };                    // { dg-error "cannot decompose class 
type 'I': its base classes 'F' and 'H' have non-static data members" }
-                                       // { dg-warning "decomposition 
declaration only available with -std=c..1z or -std=gnu..1z" "" { target 
c++14_down } .-1 }
+                                       // { dg-warning "structured bindings 
only available with -std=c..1z or -std=gnu..1z" "" { target c++14_down } .-1 }
 }
--- gcc/testsuite/g++.dg/cpp1z/decomp5.C.jj     2017-06-30 16:46:54.513562436 
+0200
+++ gcc/testsuite/g++.dg/cpp1z/decomp5.C        2017-07-03 17:51:20.432822917 
+0200
@@ -12,19 +12,19 @@ main ()
       x.i = i;
       x.j = 2 * i++;
     }
-  for (auto & [ x, y ] : a)    // { dg-warning "decomposition declaration only 
available with" "" { target c++14_down } }
+  for (auto & [ x, y ] : a)    // { dg-warning "structured bindings only 
available with" "" { target c++14_down } }
     {
       x += 2;
       y += 3;
     }
   i = 0;
-  for (const auto [ u, v ] : a)        // { dg-warning "decomposition 
declaration only available with" "" { target c++14_down } }
+  for (const auto [ u, v ] : a)        // { dg-warning "structured bindings 
only available with" "" { target c++14_down } }
     {
       if (u != i + 2 || v != 2 * i++ + 3)
        __builtin_abort ();
     }
   i = 0;
-  for (auto [ x, y ] : a)      // { dg-warning "decomposition declaration only 
available with" "" { target c++14_down } }
+  for (auto [ x, y ] : a)      // { dg-warning "structured bindings only 
available with" "" { target c++14_down } }
     {
       x += 4;
       y += 5;
--- gcc/testsuite/g++.dg/cpp1z/decomp6.C.jj     2017-06-30 16:46:54.608561302 
+0200
+++ gcc/testsuite/g++.dg/cpp1z/decomp6.C        2017-07-03 17:51:20.453822664 
+0200
@@ -23,7 +23,7 @@ main ()
     if (ccnt != 6 || dcnt || cccnt || tccnt)
       __builtin_abort ();
     {
-      auto [b,c,d,e,f,g] = a;          // { dg-warning "decomposition 
declaration only available with" "" { target c++14_down } }
+      auto [b,c,d,e,f,g] = a;          // { dg-warning "structured bindings 
only available with" "" { target c++14_down } }
       if (ccnt != 6 || dcnt || cccnt || tccnt != 6)
        __builtin_abort ();
       b.a++;
@@ -34,7 +34,7 @@ main ()
       if (&b == &a[0] || &c == &a[1] || &d == &a[2] || &e == &a[3] || &f == 
&a[4] || &g == &a[5])
        __builtin_abort ();
       {
-       auto&[ h, i, j, k, l, m ] = a;  // { dg-warning "decomposition 
declaration only available with" "" { target c++14_down } }
+       auto&[ h, i, j, k, l, m ] = a;  // { dg-warning "structured bindings 
only available with" "" { target c++14_down } }
        if (ccnt != 6 || dcnt || cccnt || tccnt != 6)
          __builtin_abort ();
        j.a += 4;
@@ -59,7 +59,7 @@ main ()
     if (ccnt != 12 || dcnt != 12 || cccnt || tccnt != 6)
       __builtin_abort ();
     {
-      auto [b,c,d,e,f,g] { a };                // { dg-warning "decomposition 
declaration only available with" "" { target c++14_down } }
+      auto [b,c,d,e,f,g] { a };                // { dg-warning "structured 
bindings only available with" "" { target c++14_down } }
       if (ccnt != 12 || dcnt != 12 || cccnt != 6 || tccnt != 6)
        __builtin_abort ();
       b.a++;
@@ -70,7 +70,7 @@ main ()
       if (&b == &a[0] || &c == &a[1] || &d == &a[2] || &e == &a[3] || &f == 
&a[4] || &g == &a[5])
        __builtin_abort ();
       {
-       auto&[ h, i, j, k, l, m ] {a};  // { dg-warning "decomposition 
declaration only available with" "" { target c++14_down } }
+       auto&[ h, i, j, k, l, m ] {a};  // { dg-warning "structured bindings 
only available with" "" { target c++14_down } }
        if (ccnt != 12 || dcnt != 12 || cccnt != 6 || tccnt != 6)
          __builtin_abort ();
        j.a += 4;
@@ -95,7 +95,7 @@ main ()
     if (ccnt != 18 || dcnt != 24 || cccnt != 6 || tccnt != 6)
       __builtin_abort ();
     {
-      auto [b,c,d,e,f,g] ( a );                // { dg-warning "decomposition 
declaration only available with" "" { target c++14_down } }
+      auto [b,c,d,e,f,g] ( a );                // { dg-warning "structured 
bindings only available with" "" { target c++14_down } }
       if (ccnt != 18 || dcnt != 24 || cccnt != 12 || tccnt != 6)
        __builtin_abort ();
       b.a++;
@@ -106,7 +106,7 @@ main ()
       if (&b == &a[0] || &c == &a[1] || &d == &a[2] || &e == &a[3] || &f == 
&a[4] || &g == &a[5])
        __builtin_abort ();
       {
-       auto&[ h, i, j, k, l, m ] (a);  // { dg-warning "decomposition 
declaration only available with" "" { target c++14_down } }
+       auto&[ h, i, j, k, l, m ] (a);  // { dg-warning "structured bindings 
only available with" "" { target c++14_down } }
        if (ccnt != 18 || dcnt != 24 || cccnt != 12 || tccnt != 6)
          __builtin_abort ();
        j.a += 4;
--- gcc/testsuite/g++.dg/cpp1z/decomp7.C.jj     2017-06-30 16:46:54.714560036 
+0200
+++ gcc/testsuite/g++.dg/cpp1z/decomp7.C        2017-07-03 17:51:20.453822664 
+0200
@@ -10,14 +10,14 @@ template <typename T, typename U>
 void
 foo (T &x, U &y)
 {
-  auto & [ c, d ] = a;         // { dg-warning "decomposition declaration only 
available with" "" { target c++14_down } }
-  auto [ e, f ] = a;           // { dg-warning "decomposition declaration only 
available with" "" { target c++14_down } }
-  auto [ g, h, i ] = sa;       // { dg-warning "decomposition declaration only 
available with" "" { target c++14_down } }
-  auto & [ j, k, l ] = sa;     // { dg-warning "decomposition declaration only 
available with" "" { target c++14_down } }
-  auto & [ m, n ] = x;         // { dg-warning "decomposition declaration only 
available with" "" { target c++14_down } }
-  auto [ o, p ] = x;           // { dg-warning "decomposition declaration only 
available with" "" { target c++14_down } }
-  auto [ q, r, s ] = y;                // { dg-warning "decomposition 
declaration only available with" "" { target c++14_down } }
-  auto & [ t, u, v ] = y;      // { dg-warning "decomposition declaration only 
available with" "" { target c++14_down } }
+  auto & [ c, d ] = a;         // { dg-warning "structured bindings only 
available with" "" { target c++14_down } }
+  auto [ e, f ] = a;           // { dg-warning "structured bindings only 
available with" "" { target c++14_down } }
+  auto [ g, h, i ] = sa;       // { dg-warning "structured bindings only 
available with" "" { target c++14_down } }
+  auto & [ j, k, l ] = sa;     // { dg-warning "structured bindings only 
available with" "" { target c++14_down } }
+  auto & [ m, n ] = x;         // { dg-warning "structured bindings only 
available with" "" { target c++14_down } }
+  auto [ o, p ] = x;           // { dg-warning "structured bindings only 
available with" "" { target c++14_down } }
+  auto [ q, r, s ] = y;                // { dg-warning "structured bindings 
only available with" "" { target c++14_down } }
+  auto & [ t, u, v ] = y;      // { dg-warning "structured bindings only 
available with" "" { target c++14_down } }
   c += 1;
   e += 2;
   g += 3;
--- gcc/testsuite/g++.dg/cpp1z/decomp8.C.jj     2017-06-30 16:46:54.763559451 
+0200
+++ gcc/testsuite/g++.dg/cpp1z/decomp8.C        2017-07-03 17:51:20.454822652 
+0200
@@ -14,19 +14,19 @@ foo (T &b)
       x.i = i;
       x.j = 2 * i++;
     }
-  for (auto & [ x, y ] : a)    // { dg-warning "decomposition declaration only 
available with" "" { target c++14_down } }
+  for (auto & [ x, y ] : a)    // { dg-warning "structured bindings only 
available with" "" { target c++14_down } }
     {
       x += 2;
       y += 3;
     }
   i = 0;
-  for (const auto [ u, v ] : a)        // { dg-warning "decomposition 
declaration only available with" "" { target c++14_down } }
+  for (const auto [ u, v ] : a)        // { dg-warning "structured bindings 
only available with" "" { target c++14_down } }
     {
       if (u != i + 2 || v != 2 * i++ + 3)
        __builtin_abort ();
     }
   i = 0;
-  for (auto [ x, y ] : a)      // { dg-warning "decomposition declaration only 
available with" "" { target c++14_down } }
+  for (auto [ x, y ] : a)      // { dg-warning "structured bindings only 
available with" "" { target c++14_down } }
     {
       x += 4;
       y += 5;
@@ -45,19 +45,19 @@ foo (T &b)
       x.i = i;
       x.j = 2 * i++;
     }
-  for (auto & [ x, y ] : b)    // { dg-warning "decomposition declaration only 
available with" "" { target c++14_down } }
+  for (auto & [ x, y ] : b)    // { dg-warning "structured bindings only 
available with" "" { target c++14_down } }
     {
       x -= 2;
       y -= 3;
     }
   i = 0;
-  for (const auto [ u, v ] : b)        // { dg-warning "decomposition 
declaration only available with" "" { target c++14_down } }
+  for (const auto [ u, v ] : b)        // { dg-warning "structured bindings 
only available with" "" { target c++14_down } }
     {
       if (u != i - 2 || v != 2 * i++ - 3)
        __builtin_abort ();
     }
   i = 0;
-  for (auto [ x, y ] : b)      // { dg-warning "decomposition declaration only 
available with" "" { target c++14_down } }
+  for (auto [ x, y ] : b)      // { dg-warning "structured bindings only 
available with" "" { target c++14_down } }
     {
       x -= 4;
       y -= 5;
--- gcc/testsuite/g++.dg/cpp1z/decomp13.C.jj    2017-06-30 16:46:54.778559272 
+0200
+++ gcc/testsuite/g++.dg/cpp1z/decomp13.C       2017-07-03 17:51:20.461822568 
+0200
@@ -11,27 +11,27 @@ namespace std {
 template<> struct std::tuple_size<B> { static constexpr int value = 2; };
 template<int I> struct std::tuple_element<I,B> { typedef int type; };
 
-auto [ aa, bb, cc, dd ] = a;           // { dg-warning "decomposition 
declaration only available with" "" { target c++14_down } }
+auto [ aa, bb, cc, dd ] = a;           // { dg-warning "structured bindings 
only available with" "" { target c++14_down } }
 // { dg-final { scan-assembler "_ZDC2aa2bb2cc2ddE" } }
-const auto & [ e, f, g, h ] = a;       // { dg-warning "decomposition 
declaration only available with" "" { target c++14_down } }
+const auto & [ e, f, g, h ] = a;       // { dg-warning "structured bindings 
only available with" "" { target c++14_down } }
 // { dg-final { scan-assembler "_ZDC1e1f1g1hE" } }
-auto [ ee, ff ] = b;                   // { dg-warning "decomposition 
declaration only available with" "" { target c++14_down } }
+auto [ ee, ff ] = b;                   // { dg-warning "structured bindings 
only available with" "" { target c++14_down } }
 // { dg-final { scan-assembler "_ZDC2ee2ffE" } }
-auto & [ gg, hh ] = b;                 // { dg-warning "decomposition 
declaration only available with" "" { target c++14_down } }
+auto & [ gg, hh ] = b;                 // { dg-warning "structured bindings 
only available with" "" { target c++14_down } }
 // { dg-final { scan-assembler "_ZDC2gg2hhE" } }
 namespace N
 {
   namespace M
   {
-    auto [ i, j, k, l ] = a;           // { dg-warning "decomposition 
declaration only available with" "" { target c++14_down } }
+    auto [ i, j, k, l ] = a;           // { dg-warning "structured bindings 
only available with" "" { target c++14_down } }
     // { dg-final { scan-assembler "_ZN1N1MDC1i1j1k1lEE" } }
-    auto & [ m, n, o, ppp ] = a;       // { dg-warning "decomposition 
declaration only available with" "" { target c++14_down } }
+    auto & [ m, n, o, ppp ] = a;       // { dg-warning "structured bindings 
only available with" "" { target c++14_down } }
     // { dg-final { scan-assembler "_ZN1N1MDC1m1n1o3pppEE" } }
-    auto [ ii, jj ] = b;               // { dg-warning "decomposition 
declaration only available with" "" { target c++14_down } }
+    auto [ ii, jj ] = b;               // { dg-warning "structured bindings 
only available with" "" { target c++14_down } }
     // { dg-final { scan-assembler "_ZN1N1MDC2ii2jjEE" } }
     // { dg-final { scan-assembler "_ZN1N1M2iiE" } }
     // { dg-final { scan-assembler "_ZN1N1M2jjE" } }
-    auto & [ mm, nn ] = b;             // { dg-warning "decomposition 
declaration only available with" "" { target c++14_down } }
+    auto & [ mm, nn ] = b;             // { dg-warning "structured bindings 
only available with" "" { target c++14_down } }
     // { dg-final { scan-assembler "_ZN1N1MDC2mm2nnEE" } }
     // { dg-final { scan-assembler "_ZN1N1M2mmE" } }
     // { dg-final { scan-assembler "_ZN1N1M2nnE" } }
@@ -39,14 +39,14 @@ namespace N
 }
 namespace std
 {
-  auto [ i2, j2, k2, l2 ] = a;         // { dg-warning "decomposition 
declaration only available with" "" { target c++14_down } }
+  auto [ i2, j2, k2, l2 ] = a;         // { dg-warning "structured bindings 
only available with" "" { target c++14_down } }
   // { dg-final { scan-assembler "_ZStDC2i22j22k22l2E" } }
-  auto [ vv, ww ] = b;                 // { dg-warning "decomposition 
declaration only available with" "" { target c++14_down } }
+  auto [ vv, ww ] = b;                 // { dg-warning "structured bindings 
only available with" "" { target c++14_down } }
   // { dg-final { scan-assembler "_ZStDC2vv2wwE" } }
   // { dg-final { scan-assembler "_ZSt2vv" } }
   // { dg-final { scan-assembler "_ZSt2ww" } }
 }
 namespace
 {
-  auto [ v, w, x, y ] = a;             // { dg-warning "decomposition 
declaration only available with" "" { target c++14_down } }
+  auto [ v, w, x, y ] = a;             // { dg-warning "structured bindings 
only available with" "" { target c++14_down } }
 }
--- gcc/testsuite/g++.dg/cpp1z/decomp14.C.jj    2017-06-30 16:46:54.554561946 
+0200
+++ gcc/testsuite/g++.dg/cpp1z/decomp14.C       2017-07-03 17:51:20.474822412 
+0200
@@ -18,13 +18,13 @@ struct M : virtual J, L {};
 void
 foo (C &c, F &f, G &g, H &h, I &i, K &k, M &m)
 {
-  auto [ ci ] = c;             // { dg-warning "decomposition declaration only 
available with" "" { target c++14_down } }
+  auto [ ci ] = c;             // { dg-warning "structured bindings only 
available with" "" { target c++14_down } }
   auto [ fi ] = f;             // { dg-error "cannot decompose class type 'F': 
both it and its base class 'A' have non-static data members" }
-                               // { dg-warning "decomposition declaration only 
available with" "" { target c++14_down } .-1 }
+                               // { dg-warning "structured bindings only 
available with" "" { target c++14_down } .-1 }
   auto [ gi ] = g;             // { dg-error "cannot decompose class type 'G': 
its base classes 'A' and 'E' have non-static data members" }
-                               // { dg-warning "decomposition declaration only 
available with" "" { target c++14_down } .-1 }
-  auto [ hi ] = h;             // { dg-warning "decomposition declaration only 
available with" "" { target c++14_down } }
+                               // { dg-warning "structured bindings only 
available with" "" { target c++14_down } .-1 }
+  auto [ hi ] = h;             // { dg-warning "structured bindings only 
available with" "" { target c++14_down } }
   auto [ ki ] = k;             // { dg-error "'B' is an ambiguous base of 'K'" 
}
-                               // { dg-warning "decomposition declaration only 
available with" "" { target c++14_down } .-1 }
-  auto [ mi ] = m;             // { dg-warning "decomposition declaration only 
available with" "" { target c++14_down } }
+                               // { dg-warning "structured bindings only 
available with" "" { target c++14_down } .-1 }
+  auto [ mi ] = m;             // { dg-warning "structured bindings only 
available with" "" { target c++14_down } }
 }
--- gcc/testsuite/g++.dg/cpp1z/decomp18.C.jj    2017-06-30 16:46:54.565561815 
+0200
+++ gcc/testsuite/g++.dg/cpp1z/decomp18.C       2017-07-03 17:51:20.474822412 
+0200
@@ -7,6 +7,6 @@ void
 foo ()
 {
   int z = 0;
-  for (auto & [ b, c, d, e, f, g, h, i, j, k, l, m, n, o, p, q, r, s ] : a)    
// { dg-warning "decomposition declaration only available with" "" { target 
c++14_down } }
+  for (auto & [ b, c, d, e, f, g, h, i, j, k, l, m, n, o, p, q, r, s ] : a)    
// { dg-warning "structured bindings only available with" "" { target 
c++14_down } }
     z += b + c + d + e + f + g + h + i + j + k + l + m + n + o + p + q + r + s;
 }
--- gcc/testsuite/g++.dg/cpp1z/decomp19.C.jj    2017-06-30 16:46:54.632561015 
+0200
+++ gcc/testsuite/g++.dg/cpp1z/decomp19.C       2017-07-03 17:51:20.475822400 
+0200
@@ -8,6 +8,6 @@ main ()
   int x = 99;
   struct S { int &x; };
   S s{x};
-  auto [p] = s;                // { dg-warning "decomposition declaration only 
available with" "" { target c++14_down } }
+  auto [p] = s;                // { dg-warning "structured bindings only 
available with" "" { target c++14_down } }
   return p - 99;
 }
--- gcc/testsuite/g++.dg/cpp1z/decomp22.C.jj    2017-06-30 16:46:54.448563212 
+0200
+++ gcc/testsuite/g++.dg/cpp1z/decomp22.C       2017-07-03 17:51:20.487822255 
+0200
@@ -16,6 +16,6 @@ int &&get (C<E...> &&);
 int
 foo (C<int> t)
 {
-  auto[x0] = t;        // { dg-warning "decomposition declaration only 
available with" "" { target c++14_down } }
+  auto[x0] = t;        // { dg-warning "structured bindings only available 
with" "" { target c++14_down } }
   return x0;
 }
--- gcc/testsuite/g++.dg/cpp1z/decomp23.C.jj    2017-06-30 16:46:54.587561552 
+0200
+++ gcc/testsuite/g++.dg/cpp1z/decomp23.C       2017-07-03 17:51:20.487822255 
+0200
@@ -7,6 +7,6 @@
 int
 foo (std::tuple<int> t)
 {
-  auto [x0] = t;       // { dg-warning "decomposition declaration only 
available with" "" { target c++14_down } }
+  auto [x0] = t;       // { dg-warning "structured bindings only available 
with" "" { target c++14_down } }
   return x0;
 }
--- gcc/testsuite/g++.dg/cpp1z/decomp24.C.jj    2017-06-30 16:46:54.643560884 
+0200
+++ gcc/testsuite/g++.dg/cpp1z/decomp24.C       2017-07-03 17:51:20.488822243 
+0200
@@ -7,5 +7,5 @@ foo ()
 {
   int a {10};
   auto [b] { [&a](){} };       // { dg-error "cannot decompose lambda closure 
type" }
-  return b - a;                        // { dg-warning "decomposition 
declaration only available with" "" { target c++14_down } .-1 }
+  return b - a;                        // { dg-warning "structured bindings 
only available with" "" { target c++14_down } .-1 }
 }
--- gcc/testsuite/g++.dg/cpp1z/decomp25.C.jj    2017-06-30 16:46:54.738559749 
+0200
+++ gcc/testsuite/g++.dg/cpp1z/decomp25.C       2017-07-03 17:51:20.488822243 
+0200
@@ -7,9 +7,9 @@ struct S
 {
   enum E { A };
   void f () { auto [x] = 0; x++; }     // { dg-error "cannot decompose 
non-array non-class type" }
-                                       // { dg-warning "decomposition 
declaration only available with" "" { target c++14_down } .-1 }
+                                       // { dg-warning "structured bindings 
only available with" "" { target c++14_down } .-1 }
   void g (T t) { auto [y] = t; y++; }  // { dg-error "cannot decompose 
non-array non-class type" }
-};                                     // { dg-warning "decomposition 
declaration only available with" "" { target c++14_down } .-1 }
+};                                     // { dg-warning "structured bindings 
only available with" "" { target c++14_down } .-1 }
 
 int
 main ()
--- gcc/testsuite/g++.dg/cpp1z/decomp26.C.jj    2017-06-30 16:46:54.468562973 
+0200
+++ gcc/testsuite/g++.dg/cpp1z/decomp26.C       2017-07-03 17:51:20.488822243 
+0200
@@ -2,5 +2,5 @@
 // { dg-do compile { target c++11 } }
 // { dg-options "" }
 
-template<typename T> T &make();        // { dg-warning "decomposition 
declaration only available with" "" { target c++14_down } .+1 }
+template<typename T> T &make();        // { dg-warning "structured bindings 
only available with" "" { target c++14_down } .+1 }
 auto [d1, d2] = make<int>();   // { dg-error "cannot decompose non-array 
non-class type" }
--- gcc/testsuite/g++.dg/cpp1z/decomp28.C.jj    2017-06-30 16:46:54.666560609 
+0200
+++ gcc/testsuite/g++.dg/cpp1z/decomp28.C       2017-07-03 17:51:20.489822231 
+0200
@@ -15,14 +15,14 @@ template <int N>
 void
 foo (std::tuple<int> b)
 {
-  auto [c] = b;                // { dg-warning "decomposition declaration only 
available with" "" { target c++14_down } }
+  auto [c] = b;                // { dg-warning "structured bindings only 
available with" "" { target c++14_down } }
 }
 
 template <typename T>
 void
 bar (std::tuple<T> b)
 {
-  auto [c] = b;                // { dg-warning "decomposition declaration only 
available with" "" { target c++14_down } }
+  auto [c] = b;                // { dg-warning "structured bindings only 
available with" "" { target c++14_down } }
 }
 
 void
@@ -35,5 +35,5 @@ baz (std::tuple<int> b)
 int
 main ()
 {
-  [](auto) { [](std::tuple<int> b) { auto[c] = b; }; } (0); // { dg-warning 
"decomposition declaration only available with" "" { target c++14_down } }
+  [](auto) { [](std::tuple<int> b) { auto[c] = b; }; } (0); // { dg-warning 
"structured bindings only available with" "" { target c++14_down } }
 }


        Jakub

Reply via email to