[Bug c++/100752] [11/12 Regression] error: cannot call member function ‘void S::f()’ without object

cvs-commit at gcc dot gnu.org gcc-bugzilla@gcc.gnu.org
Sat Jun 26 00:12:20 GMT 2021


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

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

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

commit r12-1822-gf9c80eb12c58126a94ad869380af5b88b752c06f
Author: Marek Polacek <polacek@redhat.com>
Date:   Tue Jun 8 17:44:13 2021 -0400

    c++: Failure to delay noexcept parsing with ptr-operator [PR100752]

    We weren't passing 'flags' to the recursive call to cp_parser_declarator
    in the ptr-operator case and as an effect, delayed parsing of noexcept
    didn't work as advertised.  The following change passes more than just
    CP_PARSER_FLAGS_DELAY_NOEXCEPT but that doesn't seem to break anything.

    I'm now also passing member_p and static_p, as a consequence, two tests
    needed small tweaks.

            PR c++/100752

    gcc/cp/ChangeLog:

            * parser.c (cp_parser_declarator): Pass flags down to
            cp_parser_declarator.  Also pass static_p/member_p.

    gcc/testsuite/ChangeLog:

            * g++.dg/cpp0x/noexcept69.C: New test.
            * g++.dg/parse/saved1.C: Adjust dg-error.
            * g++.dg/template/crash50.C: Likewise.


More information about the Gcc-bugs mailing list