https://gcc.gnu.org/bugzilla/show_bug.cgi?id=90124
Martin Liška <marxin at gcc dot gnu.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Keywords|needs-reduction | --- Comment #5 from Martin Liška <marxin at gcc dot gnu.org> --- Reduced test-case: $ cat pr90124.ii class a { public: int b; }; class c : a { auto m_fn1() -> decltype(b); }; $ g++ pr90124.ii -c -fmax-errors=1 -Werror pr90124.ii:6:28: error: invalid use of incomplete type ‘class c’ 6 | auto m_fn1() -> decltype(b); | ^ pr90124.ii:5:7: note: definition of ‘class c’ is not complete until the closing brace 5 | class c : a { | ^ $ g++-8 pr90124.ii -c -fmax-errors=1 -Werror [OK]