diff options
author | Nathaniel Shead <nathanieloshead@gmail.com> | 2024-04-08 23:34:42 +1000 |
---|---|---|
committer | Nathaniel Shead <nathanieloshead@gmail.com> | 2024-04-15 18:22:56 +1000 |
commit | 3878e9aeb30cb192f769997c52743daf8190744c (patch) | |
tree | bea31805c292d1add7a09b1fc59d76eb5c965ddb /gcc/cp/module.cc | |
parent | fe99ab1f5e9920fd46ef8148fcffde6729d68523 (diff) | |
download | gcc-3878e9aeb30cb192f769997c52743daf8190744c.zip gcc-3878e9aeb30cb192f769997c52743daf8190744c.tar.gz gcc-3878e9aeb30cb192f769997c52743daf8190744c.tar.bz2 |
c++: Only emit exported GMF usings [PR114600]
A typo in r14-6978 made us emit too many things. This ensures that we
don't emit using-declarations from the GMF that we don't need to.
PR c++/114600
gcc/cp/ChangeLog:
* module.cc (depset::hash::add_binding_entity): Require both
WMB_Using and WMB_Export for GMF entities.
gcc/testsuite/ChangeLog:
* g++.dg/modules/using-14.C: New test.
Signed-off-by: Nathaniel Shead <nathanieloshead@gmail.com>
Co-authored-by: Patrick Palka <ppalka@redhat.com>
Diffstat (limited to 'gcc/cp/module.cc')
-rw-r--r-- | gcc/cp/module.cc | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/gcc/cp/module.cc b/gcc/cp/module.cc index 001430a..d94d8ff 100644 --- a/gcc/cp/module.cc +++ b/gcc/cp/module.cc @@ -13090,7 +13090,7 @@ depset::hash::add_binding_entity (tree decl, WMB_Flags flags, void *data_) inner = DECL_TEMPLATE_RESULT (inner); if ((!DECL_LANG_SPECIFIC (inner) || !DECL_MODULE_PURVIEW_P (inner)) - && !(flags & (WMB_Using | WMB_Export))) + && !((flags & WMB_Using) && (flags & WMB_Export))) /* Ignore global module fragment entities unless explicitly exported with a using declaration. */ return false; |