https://gcc.gnu.org/bugzilla/show_bug.cgi?id=84588

Paolo Carlini <paolo.carlini at oracle dot com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |paolo.carlini at oracle dot com

--- Comment #3 from Paolo Carlini <paolo.carlini at oracle dot com> ---
I believe that for the regression we want something like (it tests fine):

Index: parser.c
===================================================================
--- parser.c    (revision 259489)
+++ parser.c    (working copy)
@@ -21358,6 +21358,8 @@ cp_parser_parameter_declaration_list (cp_parser* p
        {
          *is_error = true;
          parameters = error_mark_node;
+         if (parser->fully_implicit_function_template_p)
+           abort_fully_implicit_template (parser);
          break;
        }

Then the diagnostic is not perfect (a spurious final warning) but is exactly
the same we issue for, say:

struct a {
  void b() {}
  void c(auto = [] {
    if (a a(int int){})
      ;
  }) {}
};

Reply via email to