https://gcc.gnu.org/bugzilla/show_bug.cgi?id=119844
Nathaniel Shead <nshead at gcc dot gnu.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Target Milestone|--- |16.0 Status|UNCONFIRMED |RESOLVED Resolution|--- |FIXED --- Comment #6 from Nathaniel Shead <nshead at gcc dot gnu.org> --- Improved the diagnostic for GCC 16; the testcase in comment #2 now says: main.cpp: In function ‘int foo(MainWindow)’: main.cpp:7:13: error: invalid use of incomplete type ‘struct User’ 7 | return m.u->value; | ^~ main.cpp:1:8: note: forward declaration of ‘struct User’ 1 | struct User; | ^~~~ In module User, imported at main.cpp:5: user.cpp:2:15: note: ‘struct User@User’ has a definition but does not correspond with ‘struct User’ because it is attached to a different module 2 | export struct User { | ^~~~