aboutsummaryrefslogtreecommitdiff
path: root/gcc/expr.cc
diff options
context:
space:
mode:
authorJason Merrill <jason@redhat.com>2024-06-12 18:24:35 -0400
committerJason Merrill <jason@redhat.com>2024-06-13 11:06:14 -0400
commit609764a42f0cd3f6358562cab98fc220d3d2d9fd (patch)
treed50115a8cdb61df9d3046b9de7bc690d23309d96 /gcc/expr.cc
parent8878fecc251762bc32c24e659695557797e03fd9 (diff)
downloadgcc-609764a42f0cd3f6358562cab98fc220d3d2d9fd.zip
gcc-609764a42f0cd3f6358562cab98fc220d3d2d9fd.tar.gz
gcc-609764a42f0cd3f6358562cab98fc220d3d2d9fd.tar.bz2
c++/modules: export using across namespace [PR114683]
Currently we represent a non-function using-declaration by inserting the named declaration into the target scope. In general this works fine, but in the case of an exported using-declaration we have nowhere to mark the using-declaration as exported, so we mark the original declaration as exported instead, and then treat all using-declarations that name it as exported as well. We were doing this only if there was also a previous non-exported using, so for this testcase the export got lost; this patch broadens the workaround to also apply to the using that first brings the declaration into the current scope. This does not fully resolve 114683, but replaces a missing exports bug with an extra exports bug, which should be a significant usability improvement. The testcase has xfails for extra exports. I imagine a complete fix should involve inserting a USING_DECL. PR c++/114683 gcc/cp/ChangeLog: * name-lookup.cc (do_nonmember_using_decl): Allow exporting a newly inserted decl. gcc/testsuite/ChangeLog: * g++.dg/modules/using-22_a.C: New test. * g++.dg/modules/using-22_b.C: New test.
Diffstat (limited to 'gcc/expr.cc')
0 files changed, 0 insertions, 0 deletions