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

--- Comment #2 from CVS Commits <cvs-commit at gcc dot gnu.org> ---
The master branch has been updated by Marek Polacek <mpola...@gcc.gnu.org>:

https://gcc.gnu.org/g:0999f26098598fe0a499c5b79ad23678ccfe583a

commit r11-5232-g0999f26098598fe0a499c5b79ad23678ccfe583a
Author: Marek Polacek <pola...@redhat.com>
Date:   Tue Nov 17 13:39:39 2020 -0500

    c++: Fix ICE-on-invalid with -Wvexing-parse [PR97881]

    This invalid (?) code broke my assumption that if decl_specifiers->type
    is null, there must be any type-specifiers.  Turn the assert into an if
    to fix this crash.

    gcc/cp/ChangeLog:

            PR c++/97881
            * parser.c (warn_about_ambiguous_parse): Only assume "int" if we
            actually saw any type-specifiers.

    gcc/testsuite/ChangeLog:

            PR c++/97881
            * g++.dg/warn/Wvexing-parse9.C: New test.

Reply via email to