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

--- Comment #4 from Jason Merrill <jason at gcc dot gnu.org> ---
Author: jason
Date: Wed Dec 11 16:51:14 2019
New Revision: 279237

URL: https://gcc.gnu.org/viewcvs?rev=279237&root=gcc&view=rev
Log:
        PR c++/92105 - decltype(decltype) error cascade.

The primary change here is to do the CPP_DECLTYPE replacement even when we
get an error, so we don't keep trying and giving the same parse error each
time.  We also commit to the tentative firewall parse more often, leading to
better diagnostics.

        * parser.c (cp_parser_decltype_expr): Don't tentative_firewall here.
        (cp_parser_decltype): Do it here.  Remember a non-tentative error.

Added:
    trunk/gcc/testsuite/g++.dg/cpp0x/decltype-err1.C
Modified:
    trunk/gcc/cp/ChangeLog
    trunk/gcc/cp/parser.c
    trunk/gcc/testsuite/g++.dg/cpp0x/decltype10.C

Reply via email to