https://gcc.gnu.org/bugzilla/show_bug.cgi?id=123189
--- Comment #4 from Dhruv Chawla <dhruvc at gcc dot gnu.org> --- Created attachment 63129 --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=63129&action=edit Preprocessed source file (In reply to Patrick Palka from comment #3) > (In reply to Dhruv Chawla from comment #2) > I'm still seeing an error with older GCC: > 123189.C:3:42: error: field ‘c’ has incomplete type > ‘{anonymous}::{anonymous}::b<a>’ [-Wtemplate-body] > 3 | template <typename a> class b { friend b c<>() noexcept(a ::d); }; > | ^ > 123189.C:3:29: note: definition of ‘class {anonymous}::{anonymous}::b<a>’ is > not complete until the closing brace > 3 | template <typename a> class b { friend b c<>() noexcept(a ::d); }; > | ^ > 123189.C:3:42: error: expected ‘;’ at end of member declaration > [-Wtemplate-body] > 3 | template <typename a> class b { friend b c<>() noexcept(a ::d); }; > | ^ > | ; > 123189.C:3:43: error: expected unqualified-id before ‘<’ token > [-Wtemplate-body] > 3 | template <typename a> class b { friend b c<>() noexcept(a ::d); }; > | ^ Hi, I have attached the pre-processed source file as is. I was unfortunately unable to reduce this to anything else.
