public inbox for gcc-bugs@sourceware.org help / color / mirror / Atom feed
From: "mpolacek at gcc dot gnu.org" <gcc-bugzilla@gcc.gnu.org> To: gcc-bugs@gcc.gnu.org Subject: [Bug c++/103401] [11/12 Regression] gcc accepts decltype(auto(0)) as the parameter of the function Date: Thu, 25 Nov 2021 02:44:47 +0000 [thread overview] Message-ID: <bug-103401-4-Ev2Gza33BY@http.gcc.gnu.org/bugzilla/> (raw) In-Reply-To: <bug-103401-4@http.gcc.gnu.org/bugzilla/> https://gcc.gnu.org/bugzilla/show_bug.cgi?id=103401 --- Comment #4 from Marek Polacek <mpolacek at gcc dot gnu.org> --- I think the patch might be just: --- a/gcc/cp/parser.c +++ b/gcc/cp/parser.c @@ -7508,6 +7508,8 @@ cp_parser_postfix_expression (cp_parser *parser, bool address_p, bool cast_p, looking at a functional cast. We could also be looking at an id-expression. So, we try the functional cast, and if that doesn't work we fall back to the primary-expression. */ + auto cleanup = make_temp_override + (parser->auto_is_implicit_function_template_parm_p, false); cp_parser_parse_tentatively (parser); /* Look for the simple-type-specifier. */ ++parser->prevent_constrained_type_specifiers; Until C++23 auto(x), we didn't have to think about auto in a parameter-decl-clause all that much I suspect.
next prev parent reply other threads:[~2021-11-25 2:44 UTC|newest] Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top 2021-11-24 7:57 [Bug c++/103401] New: " hewillk at gmail dot com 2021-11-24 9:38 ` [Bug c++/103401] " redi at gcc dot gnu.org 2021-11-24 9:40 ` [Bug c++/103401] [11/12 Regression] " redi at gcc dot gnu.org 2021-11-24 14:37 ` mpolacek at gcc dot gnu.org 2021-11-25 0:56 ` mpolacek at gcc dot gnu.org 2021-11-25 2:44 ` mpolacek at gcc dot gnu.org [this message] 2021-12-09 16:49 ` cvs-commit at gcc dot gnu.org 2021-12-09 17:26 ` mpolacek at gcc dot gnu.org
Reply instructions: You may reply publicly to this message via plain-text email using any one of the following methods: * Save the following mbox file, import it into your mail client, and reply-to-all from there: mbox Avoid top-posting and favor interleaved quoting: https://en.wikipedia.org/wiki/Posting_style#Interleaved_style * Reply using the --to, --cc, and --in-reply-to switches of git-send-email(1): git send-email \ --in-reply-to=bug-103401-4-Ev2Gza33BY@http.gcc.gnu.org/bugzilla/ \ --to=gcc-bugzilla@gcc.gnu.org \ --cc=gcc-bugs@gcc.gnu.org \ /path/to/YOUR_REPLY https://kernel.org/pub/software/scm/git/docs/git-send-email.html * If your mail client supports setting the In-Reply-To header via mailto: links, try the mailto: linkBe sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox; as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).