]>
gcc.gnu.org Git - gcc.git/commit
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.
This page took 0.062109 seconds and 6 git commands to generate.