aboutsummaryrefslogtreecommitdiff
path: root/libjava/java/util
diff options
context:
space:
mode:
authorNathaniel Shead <nathanieloshead@gmail.com>2025-04-29 17:31:55 +1000
committerNathaniel Shead <nathanieloshead@gmail.com>2025-05-01 09:50:20 +1000
commit22ccaded63e96e5a42f4e3676dbbb57aa05b36f9 (patch)
treebe5968436bbd57075b1bc594a34888bacd4ea22e /libjava/java/util
parent299d48ff4a34c00a6ef964b694fb9b1312683049 (diff)
downloadgcc-22ccaded63e96e5a42f4e3676dbbb57aa05b36f9.zip
gcc-22ccaded63e96e5a42f4e3676dbbb57aa05b36f9.tar.gz
gcc-22ccaded63e96e5a42f4e3676dbbb57aa05b36f9.tar.bz2
c++/modules: Catch exposures of TU-local values through inline references [PR119996]
In r15-9136-g0210bedf481a9f we started erroring for inline variables that exposed TU-local entities in their definition, as such variables would need to have their definitions emitted in importers but would not know about the TU-local entities they referenced. A case we mised was potentially-constant references, which disable streaming of their definitions in make_dependency so as to comply with [expr.const] p9.2. This meant that we didn't see the definition referencing a TU-local entity, leading to nonsensical results. PR c++/119551 PR c++/119996 gcc/cp/ChangeLog: * module.cc (depset::hash::make_dependency): Also mark inline variables referencing TU-local values as exposures here. (depset::hash::finalize_dependencies): Add error message for inline variables. gcc/testsuite/ChangeLog: * g++.dg/modules/internal-13.C: New test. Signed-off-by: Nathaniel Shead <nathanieloshead@gmail.com> Reviewed-by: Jason Merrill <jason@redhat.com>
Diffstat (limited to 'libjava/java/util')
0 files changed, 0 insertions, 0 deletions