[Bug c++/97517] 'nullptr_type' not supported by simple_type_specifier'nullptr_type' not supported by direct_abstract_declarator

cvs-commit at gcc dot gnu.org gcc-bugzilla@gcc.gnu.org
Wed Dec 9 14:28:20 GMT 2020


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

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

commit r11-5884-gfe70679b80f5e6193a0976be41b68d590c7cb2f3
Author: Marek Polacek <polacek@redhat.com>
Date:   Tue Dec 8 16:44:53 2020 -0500

    c++: Fix printing of decltype(nullptr) [PR97517]

    The C++ printer doesn't handle NULLPTR_TYPE, so we issue the ugly
    "'nullptr_type' not supported by...".  Since NULLPTR_TYPE is
    decltype(nullptr), it seemed reasonable to handle it where we
    handle DECLTYPE_TYPE, that is, in the simple-type-specifier handler.

    gcc/cp/ChangeLog:

            PR c++/97517
            * cxx-pretty-print.c (cxx_pretty_printer::simple_type_specifier):
Handle
            NULLPTR_TYPE.
            (pp_cxx_type_specifier_seq): Likewise.
            (cxx_pretty_printer::type_id): Likewise.

    gcc/testsuite/ChangeLog:

            PR c++/97517
            * g++.dg/diagnostic/nullptr.C: New test.


More information about the Gcc-bugs mailing list