From b0df5ff8bec008165d90e57e64e3643196f527c2 Mon Sep 17 00:00:00 2001 From: Jakub Jelinek Date: Wed, 29 May 2019 09:45:49 +0200 Subject: [PATCH] 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: r271731 --- gcc/cp/ChangeLog | 12 ++++++++++++ gcc/testsuite/ChangeLog | 12 ++++++++++++ 2 files changed, 24 insertions(+) diff --git a/gcc/cp/ChangeLog b/gcc/cp/ChangeLog index 0552d913820..d0122c7b024 100644 --- a/gcc/cp/ChangeLog +++ b/gcc/cp/ChangeLog @@ -1,3 +1,15 @@ +2019-05-29 Jakub Jelinek + + 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. + 2019-05-28 Nathan Sidwell * decl.c (duplicate_decls): Assert a template newdecl has no diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog index 99a9baa40a8..7149cdf6fa5 100644 --- a/gcc/testsuite/ChangeLog +++ b/gcc/testsuite/ChangeLog @@ -1,3 +1,15 @@ +2019-05-29 Jakub Jelinek + + P1091R3 - Extending structured bindings to be more like var decls + P1381R1 - Reference capture of structured bindings + * 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. + 2019-05-29 Martin Liska PR testsuite/90657 -- 2.30.2