Skip to content
Snippets Groups Projects
Commit 2fcb0c07 authored by Nathaniel Shead's avatar Nathaniel Shead
Browse files

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: default avatarNathaniel Shead <nathanieloshead@gmail.com>
parent 5c0e1879
No related branches found
No related tags found
No related merge requests found
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment