https://gcc.gnu.org/bugzilla/show_bug.cgi?id=90485
Jonathan Wakely <redi at gcc dot gnu.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|UNCONFIRMED |NEW Last reconfirmed| |2019-05-15 Ever confirmed|0 |1 --- Comment #1 from Jonathan Wakely <redi at gcc dot gnu.org> --- It would be nice to get it for more than just attributes, member functions can have a whole zoo of tokens at the end of a function declarator: struct X { void f1() noexcept const; void f2() & const; void f3() noexcept &; virtual void f4() final const; }; 90485.C:2:13: error: expected ‘;’ at end of member declaration void f1() noexcept const; ^~~~~~~~ ; 90485.C:2:22: error: declaration does not declare anything [-fpermissive] void f1() noexcept const; ^~~~~ 90485.C:3:13: error: expected ‘;’ at end of member declaration void f2() & const; ^ ; 90485.C:3:15: error: declaration does not declare anything [-fpermissive] void f2() & const; ^~~~~ 90485.C:4:13: error: expected ‘;’ at end of member declaration void f3() noexcept &; ^~~~~~~~ ; 90485.C:4:23: error: expected unqualified-id before ‘;’ token void f3() noexcept &; ^ 90485.C:5:21: error: expected ‘;’ at end of member declaration virtual void f4() final const; ^~~~~ ; 90485.C:5:27: error: declaration does not declare anything [-fpermissive] virtual void f4() final const; ^~~~~