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

--- 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:a51de1af063b0a9233762dcd6ecf2ea0bdf4cdff

commit r11-1913-ga51de1af063b0a9233762dcd6ecf2ea0bdf4cdff
Author: Marek Polacek <pola...@redhat.com>
Date:   Tue Jul 7 17:09:42 2020 -0400

    c++: Better diagnostic for decltype(auto) in C++11 [PR96103]

    If you try to use decltype(auto) in C++11, we emit obscure

      error: expected primary-expression before 'auto'

    giving the user no hint as to what's wrong.  This patch improves that
    diagnostic.  Since we've been giving an error, I'm also using error().

    gcc/cp/ChangeLog:

            PR c++/96103
            * parser.c (cp_parser_decltype): Print error about using
decltype(auto)
            in C++11.  Check that the token following "auto" is ")".

    gcc/testsuite/ChangeLog:

            PR c++/96103
            * g++.dg/cpp0x/decltype77.C: New test.

Reply via email to