https://gcc.gnu.org/bugzilla/show_bug.cgi?id=121552
--- Comment #7 from GCC Commits <cvs-commit at gcc dot gnu.org> --- The releases/gcc-16 branch has been updated by Jason Merrill <[email protected]>: https://gcc.gnu.org/g:6e67742b4f4fabc75b85b92dd935c298d3a23426 commit r16-9234-g6e67742b4f4fabc75b85b92dd935c298d3a23426 Author: Jason Merrill <[email protected]> Date: Mon Jul 6 12:16:38 2026 -0400 c++: naming typedef and incomplete class [PR126031] We can't look at the bases and members of a forward-declared nested class, and such a forward declaration can't contain problematic constructs, so treat it as OK. PR c++/126031 PR c++/121552 gcc/cp/ChangeLog: * decl.cc (maybe_diagnose_non_c_class_typedef_for_linkage): Handle incomplete type. gcc/testsuite/ChangeLog: * g++.dg/cpp2a/typedef2.C: New test. (cherry picked from commit b6825a7ce698b65657e952e437ab9edd655fe5a5)
