public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c++/85846] [Concepts] Concept as value in initializer: bogus declared-as-implicit-template error
       [not found] <bug-85846-4@http.gcc.gnu.org/bugzilla/>
@ 2021-11-09 14:11 ` cvs-commit at gcc dot gnu.org
  2021-11-09 14:12 ` ppalka at gcc dot gnu.org
                   ` (3 subsequent siblings)
  4 siblings, 0 replies; 5+ messages in thread
From: cvs-commit at gcc dot gnu.org @ 2021-11-09 14:11 UTC (permalink / raw)
  To: gcc-bugs

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

--- 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.

^ permalink raw reply	[flat|nested] 5+ messages in thread

* [Bug c++/85846] [Concepts] Concept as value in initializer: bogus declared-as-implicit-template error
       [not found] <bug-85846-4@http.gcc.gnu.org/bugzilla/>
  2021-11-09 14:11 ` [Bug c++/85846] [Concepts] Concept as value in initializer: bogus declared-as-implicit-template error cvs-commit at gcc dot gnu.org
@ 2021-11-09 14:12 ` ppalka at gcc dot gnu.org
  2021-12-15 19:55 ` cvs-commit at gcc dot gnu.org
                   ` (2 subsequent siblings)
  4 siblings, 0 replies; 5+ messages in thread
From: ppalka at gcc dot gnu.org @ 2021-11-09 14:12 UTC (permalink / raw)
  To: gcc-bugs

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

Patrick Palka <ppalka at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |ASSIGNED
                 CC|                            |ppalka at gcc dot gnu.org
   Target Milestone|---                         |11.3
           Assignee|unassigned at gcc dot gnu.org      |ppalka at gcc dot gnu.org

^ permalink raw reply	[flat|nested] 5+ messages in thread

* [Bug c++/85846] [Concepts] Concept as value in initializer: bogus declared-as-implicit-template error
       [not found] <bug-85846-4@http.gcc.gnu.org/bugzilla/>
  2021-11-09 14:11 ` [Bug c++/85846] [Concepts] Concept as value in initializer: bogus declared-as-implicit-template error cvs-commit at gcc dot gnu.org
  2021-11-09 14:12 ` 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
  2022-02-02  2:08 ` ppalka at gcc dot gnu.org
  4 siblings, 0 replies; 5+ messages in thread
From: cvs-commit at gcc dot gnu.org @ 2021-12-15 19:55 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #2 from CVS Commits <cvs-commit at gcc dot gnu.org> ---
The releases/gcc-11 branch has been updated by Patrick Palka
<ppalka@gcc.gnu.org>:

https://gcc.gnu.org/g:a94867f67e0b48ba53691f1d5f43f5c7d60adecb

commit r11-9388-ga94867f67e0b48ba53691f1d5f43f5c7d60adecb
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.

    (cherry picked from commit a22d910305a5232694ff48ead37a7f53e46b7202)

^ permalink raw reply	[flat|nested] 5+ messages in thread

* [Bug c++/85846] [Concepts] Concept as value in initializer: bogus declared-as-implicit-template error
       [not found] <bug-85846-4@http.gcc.gnu.org/bugzilla/>
                   ` (2 preceding siblings ...)
  2021-12-15 19:55 ` cvs-commit at gcc dot gnu.org
@ 2021-12-15 19:56 ` ppalka at gcc dot gnu.org
  2022-02-02  2:08 ` ppalka at gcc dot gnu.org
  4 siblings, 0 replies; 5+ messages in thread
From: ppalka at gcc dot gnu.org @ 2021-12-15 19:56 UTC (permalink / raw)
  To: gcc-bugs

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

Patrick Palka <ppalka at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
         Resolution|---                         |FIXED
             Status|ASSIGNED                    |RESOLVED

--- Comment #3 from Patrick Palka <ppalka at gcc dot gnu.org> ---
Fixed for GCC 11.3/12.

^ permalink raw reply	[flat|nested] 5+ messages in thread

* [Bug c++/85846] [Concepts] Concept as value in initializer: bogus declared-as-implicit-template error
       [not found] <bug-85846-4@http.gcc.gnu.org/bugzilla/>
                   ` (3 preceding siblings ...)
  2021-12-15 19:56 ` ppalka at gcc dot gnu.org
@ 2022-02-02  2:08 ` ppalka at gcc dot gnu.org
  4 siblings, 0 replies; 5+ messages in thread
From: ppalka at gcc dot gnu.org @ 2022-02-02  2:08 UTC (permalink / raw)
  To: gcc-bugs

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

Patrick Palka <ppalka at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |hewillk at gmail dot com

--- Comment #4 from Patrick Palka <ppalka at gcc dot gnu.org> ---
*** Bug 99923 has been marked as a duplicate of this bug. ***

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2022-02-02  2:08 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
     [not found] <bug-85846-4@http.gcc.gnu.org/bugzilla/>
2021-11-09 14:11 ` [Bug c++/85846] [Concepts] Concept as value in initializer: bogus declared-as-implicit-template error cvs-commit at gcc dot gnu.org
2021-11-09 14:12 ` 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
2022-02-02  2:08 ` ppalka at gcc dot gnu.org

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).