public inbox for gcc-bugs@sourceware.org help / color / mirror / Atom feed
From: "cvs-commit at gcc dot gnu.org" <gcc-bugzilla@gcc.gnu.org> To: gcc-bugs@gcc.gnu.org Subject: [Bug c++/98394] Concept with auto... template parameter pack in if-statement causes compilation error Date: Tue, 09 Nov 2021 14:11:13 +0000 [thread overview] Message-ID: <bug-98394-4-v7GxeP0gsg@http.gcc.gnu.org/bugzilla/> (raw) In-Reply-To: <bug-98394-4@http.gcc.gnu.org/bugzilla/> https://gcc.gnu.org/bugzilla/show_bug.cgi?id=98394 --- Comment #1 from CVS Commits <cvs-commit at gcc dot gnu.org> --- The master branch has been updated by Patrick Palka <ppalka@gcc.gnu.org>: https://gcc.gnu.org/g:a22d910305a5232694ff48ead37a7f53e46b7202 commit r12-5053-ga22d910305a5232694ff48ead37a7f53e46b7202 Author: Patrick Palka <ppalka@redhat.com> Date: Tue Nov 9 09:09:43 2021 -0500 c++: bogus error w/ tentative type parse of concept-id [PR98394] Here when tentatively parsing the if condition as a declaration, we try to treat C<1> as the start of a constrained placeholder type, which we quickly reject because C doesn't accept a type as its first argument. But since we're parsing tentatively, we shouldn't emit an error in this case. In passing, also fix PR85846 by only overriding 'tentative' to false when given a concept-name, and not also when given a concept-id that has an empty argument list. PR c++/98394 PR c++/85846 gcc/cp/ChangeLog: * parser.c (cp_parser_placeholder_type_specifier): Declare static. Don't override tentative to false when tmpl is a concept-id with empty argument list. Don't emit a "does not constrain a type" error when tentative. gcc/testsuite/ChangeLog: * g++.dg/cpp2a/concepts-pr98394.C: New test. * g++.dg/cpp2a/concepts-pr85846.C: New test.
next prev parent reply other threads:[~2021-11-09 14:11 UTC|newest] Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top 2020-12-19 18:20 [Bug c++/98394] New: " ngmr80 at web dot de 2021-11-09 14:11 ` cvs-commit at gcc dot gnu.org [this message] 2021-11-09 14:12 ` [Bug c++/98394] " ppalka at gcc dot gnu.org 2021-12-15 19:55 ` cvs-commit at gcc dot gnu.org 2021-12-15 19:56 ` ppalka 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-98394-4-v7GxeP0gsg@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).