diff options
author | Marek Polacek <polacek@redhat.com> | 2020-07-07 17:09:42 -0400 |
---|---|---|
committer | Marek Polacek <polacek@redhat.com> | 2020-07-08 09:13:39 -0400 |
commit | a51de1af063b0a9233762dcd6ecf2ea0bdf4cdff (patch) | |
tree | b7722f9e5c4e47e8e1ce9a6a0523c207e60d532a /gcc/ada | |
parent | 4070208f2384df01798d23e6ecba7b30296aa588 (diff) | |
download | gcc-a51de1af063b0a9233762dcd6ecf2ea0bdf4cdff.zip gcc-a51de1af063b0a9233762dcd6ecf2ea0bdf4cdff.tar.gz gcc-a51de1af063b0a9233762dcd6ecf2ea0bdf4cdff.tar.bz2 |
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.
Diffstat (limited to 'gcc/ada')
0 files changed, 0 insertions, 0 deletions