-
- Downloads
c++/modules: Check linkage of structured binding decls
When looking at PR c++/118513 I noticed that we don't currently check
the linkage of structured binding declarations in modules. This patch
adds those checks, and corrects decl_linkage to properly recognise
structured binding declarations as potentially having linkage.
gcc/cp/ChangeLog:
* parser.cc (cp_parser_decomposition_declaration): Check linkage
of structured bindings in modules.
* tree.cc (decl_linkage): Structured bindings don't necessarily
have no linkage.
gcc/testsuite/ChangeLog:
* g++.dg/modules/export-6.C: Add structured binding tests.
* g++.dg/modules/hdr-2.H: Likewise.
Signed-off-by:
Nathaniel Shead <nathanieloshead@gmail.com>
Showing
- gcc/cp/parser.cc 1 addition, 0 deletionsgcc/cp/parser.cc
- gcc/cp/tree.cc 2 additions, 0 deletionsgcc/cp/tree.cc
- gcc/testsuite/g++.dg/modules/export-6.C 6 additions, 0 deletionsgcc/testsuite/g++.dg/modules/export-6.C
- gcc/testsuite/g++.dg/modules/hdr-2.H 9 additions, 0 deletionsgcc/testsuite/g++.dg/modules/hdr-2.H
Loading
Please register or sign in to comment