[Bug c++/91073] [9/10 Regression] if constexpr no longer works directly with Concepts

redi at gcc dot gnu.org gcc-bugzilla@gcc.gnu.org
Wed Jul 3 21:22:00 GMT 2019


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

Jonathan Wakely <redi at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |NEW
      Known to work|                            |8.3.0
           Keywords|                            |rejects-valid
   Last reconfirmed|                            |2019-07-03
                 CC|                            |paolo at gcc dot gnu.org
     Ever confirmed|0                           |1
            Summary|if constexpr no longer      |[9/10 Regression] if
                   |works directly with         |constexpr no longer works
                   |Concepts                    |directly with Concepts
      Known to fail|                            |10.0, 9.1.0

--- Comment #1 from Jonathan Wakely <redi at gcc dot gnu.org> ---
Confirmed as a regression (GCC 8 accepts it, if 'concept HasInit' is replaced
with 'concept bool HasInit'). It started to be rejected with r260482:

            PR c++/84588
            * parser.c (cp_parser_maybe_commit_to_declaration,
            cp_parser_check_condition_declarator): New.
            (cp_parser_simple_declaration): Use the first above.
            (cp_parser_condition): Use both the above; enforce
            [stmt.stmt]/2 about the declarator not specifying
            a function or an array; improve error-recovery.


More information about the Gcc-bugs mailing list