P1091R3 - Extending structured bindings to be more like var decls P1381R1 - Reference...
authorJakub Jelinek <jakub@gcc.gnu.org>
Wed, 29 May 2019 07:44:50 +0000 (09:44 +0200)
committerJakub Jelinek <jakub@gcc.gnu.org>
Wed, 29 May 2019 07:44:50 +0000 (09:44 +0200)
commitb7f0df71a9de2354fcb7fb991e2a7406405c612d
tree664035c798dd7103c37102b0e519d9445c3ebf65
parent2186b5d022d787d76a7311f0bd37d3597ab72ab8
P1091R3 - Extending structured bindings to be more like var decls P1381R1 - Reference capture of structured bindings

P1091R3 - Extending structured bindings to be more like var decls
P1381R1 - Reference capture of structured bindings
* decl.c (cp_maybe_mangle_decomp): Handle TREE_STATIC decls even at
function scope.
(cp_finish_decomp): Copy over various decl properties from decl to
v[i] in the tuple case.
(grokdeclarator): Allow static, thread_local and __thread for C++2a
and use pedwarn instead of error for older standard revisions.
Make other structured binding diagnostic messages more i18n friendly.

* g++.dg/cpp1z/decomp3.C (test): For static, expect only warning
instead of error and only for c++17_down.  Add a thread_local test.
(z2): Add a __thread test.
* g++.dg/cpp2a/decomp1.C: New test.
* g++.dg/cpp2a/decomp1-aux.cc: New file.
* g++.dg/cpp2a/decomp2.C: New test.
* g++.dg/cpp2a/decomp3.C: New test.

From-SVN: r271730
gcc/cp/decl.c
gcc/testsuite/g++.dg/cpp1z/decomp3.C
gcc/testsuite/g++.dg/cpp2a/decomp1-aux.cc [new file with mode: 0644]
gcc/testsuite/g++.dg/cpp2a/decomp1.C [new file with mode: 0644]
gcc/testsuite/g++.dg/cpp2a/decomp2.C [new file with mode: 0644]
gcc/testsuite/g++.dg/cpp2a/decomp3.C [new file with mode: 0644]