https://gcc.gnu.org/bugzilla/show_bug.cgi?id=98441
Jonathan Wakely <redi at gcc dot gnu.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Target Milestone|--- |10.3 Status|UNCONFIRMED |NEW Keywords| |rejects-valid Ever confirmed|0 |1 CC| |mpolacek at gcc dot gnu.org Summary|member function pointer |[10/11 Regression] member |incorrectly parsed as |function pointer |having trailing return type |incorrectly parsed as | |having trailing return type Last reconfirmed| |2020-12-27 --- Comment #2 from Jonathan Wakely <redi at gcc dot gnu.org> --- Started to be rejected with r11-2085: c++: Improve checking of decls with trailing return type [PR95820] This is an ICE-on-invalid but I've been seeing it when reducing various testcases, so it's more important for me than usually. splice_late_return_type now checks that if we've seen a late return type, the function return type was auto. That's a fair assumption but grokdeclarator/cdk_function wasn't giving errors for function pointers and similar. So we want to perform various checks not only when funcdecl_p || inner_declarator == NULL. But only give the !late_return_type errors when funcdecl_p, to accept e.g. auto (*fp)() = f;