diff options
author | Nathaniel Shead <nathanieloshead@gmail.com> | 2023-11-13 16:48:36 +1100 |
---|---|---|
committer | Nathaniel Shead <nathanieloshead@gmail.com> | 2023-11-25 12:44:17 +1100 |
commit | 9dd8be6fc2debc4fbd0950386d4e98878af27a45 (patch) | |
tree | 73c796cfdef8fced6012cba8ab5fa9da5c139f9b /gcc/doc/cpp.texi | |
parent | 77cf1dba78b25f2e57bdbcffd6499a288772e700 (diff) | |
download | gcc-9dd8be6fc2debc4fbd0950386d4e98878af27a45.zip gcc-9dd8be6fc2debc4fbd0950386d4e98878af27a45.tar.gz gcc-9dd8be6fc2debc4fbd0950386d4e98878af27a45.tar.bz2 |
c++: Allow exporting a typedef redeclaration [PR102341]
A typedef doesn't create a new entity, and thus should be allowed to be
exported even if it has been previously declared un-exported. See the
example in [module.interface] p6:
export module M;
struct S { int n; };
typedef S S;
export typedef S S; // OK, does not redeclare an entity
PR c++/102341
gcc/cp/ChangeLog:
* decl.cc (duplicate_decls): Allow exporting a redeclaration of
a typedef.
gcc/testsuite/ChangeLog:
* g++.dg/modules/export-1.C: Adjust test.
* g++.dg/modules/export-2_a.C: New test.
* g++.dg/modules/export-2_b.C: New test.
Signed-off-by: Nathaniel Shead <nathanieloshead@gmail.com>
Diffstat (limited to 'gcc/doc/cpp.texi')
0 files changed, 0 insertions, 0 deletions