aboutsummaryrefslogtreecommitdiff
path: root/libjava
diff options
context:
space:
mode:
authorNathaniel Shead <nathanieloshead@gmail.com>2025-08-27 22:24:43 +1000
committerNathaniel Shead <nathanieloshead@gmail.com>2025-08-28 22:33:25 +1000
commit10418a6cbd34e0a4081f6dcdf8c36a9592aaf318 (patch)
tree65a3c05f5d9f64042cf19c4aa2e51e26ce2ed221 /libjava
parent69faef01dff124cd2e657b7525ba6cc574626853 (diff)
downloadgcc-10418a6cbd34e0a4081f6dcdf8c36a9592aaf318.zip
gcc-10418a6cbd34e0a4081f6dcdf8c36a9592aaf318.tar.gz
gcc-10418a6cbd34e0a4081f6dcdf8c36a9592aaf318.tar.bz2
c++/modules: Add explanatory note for incomplete types with definition in different module [PR119844]
The confusion in the PR arose because the definition of 'User' in a separate named module did not provide an implementation for the forward-declaration in the global module. This seems likely to be a common mistake while people are transitioning to modules, so this patch adds an explanatory note. While I was looking at this I also noticed that the existing handling of partial specialisations for this note was wrong (we pointed at the primary template declaration rather than the relevant partial spec), so this patch fixes that up, and also gives a more precise error message for using a template other than by self-reference while it's being defined. PR c++/119844 gcc/cp/ChangeLog: * typeck2.cc (cxx_incomplete_type_inform): Add explanation when a similar type is complete but attached to a different module. Also fix handling of partial specs and templates. gcc/testsuite/ChangeLog: * g++.dg/modules/pr119844_a.C: New test. * g++.dg/modules/pr119844_b.C: New test. Signed-off-by: Nathaniel Shead <nathanieloshead@gmail.com>
Diffstat (limited to 'libjava')
0 files changed, 0 insertions, 0 deletions