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

--- Comment #4 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:3a5f8d745f8e26d973218b088788f22ad197ca67

commit r11-4850-g3a5f8d745f8e26d973218b088788f22ad197ca67
Author: Marek Polacek <pola...@redhat.com>
Date:   Mon Nov 9 10:19:07 2020 -0500

    c++: Fix -Wvexing-parse ICE with omitted int [PR97762]

    For declarations like

      long f();

    decl_specifiers->type will be NULL, but I neglected to handle this case,
    therefore we ICE.  So handle this case by pretending we've seen 'int',
    which is good enough for -Wvexing-parse's purposes.

    gcc/cp/ChangeLog:

            PR c++/97762
            * parser.c (warn_about_ambiguous_parse): Handle the case when
            there is no type in the decl-specifiers.

    gcc/testsuite/ChangeLog:

            PR c++/97762
            * g++.dg/warn/Wvexing-parse8.C: New test.

Reply via email to