diff options
author | Patrick Palka <ppalka@redhat.com> | 2020-04-14 14:22:31 -0400 |
---|---|---|
committer | Patrick Palka <ppalka@redhat.com> | 2020-04-14 14:22:31 -0400 |
commit | 58a29af8ef14bfa2d595deed5144891bff821eff (patch) | |
tree | 9c328539d5e9ef52e34dc7aebecda7faad0d4c9c /gcc/c/c-parser.c | |
parent | 9707b593f88041e74e5cf5640ec64fea13a0387c (diff) | |
download | gcc-58a29af8ef14bfa2d595deed5144891bff821eff.zip gcc-58a29af8ef14bfa2d595deed5144891bff821eff.tar.gz gcc-58a29af8ef14bfa2d595deed5144891bff821eff.tar.bz2 |
c++: "'decltype_type' not supported" in diagnostic [PR85278]
This fixes a garbled concepts diagnostic by moving the handling of DECLTYPE_TYPE
from pp_cxx_type_specifier_seq to cxx_pretty_printer::simple_type_specifier, a
move which also seems to be more consistent with the language grammar.
This patch also fixes pretty printing of rvalue reference types via
cxx_pretty_printer::type_id, which eventually calls pp_c_pointer which currently
doesn't distinguish between lvalue and rvalue references.
gcc/c-family/ChangeLog:
PR c++/85278
* c-pretty-print.c (pp_c_pointer) <case REFERENCE_TYPE>: Print a double
ampersand if it's an rvalue reference type.
gcc/cp/ChangeLog:
PR c++/85278
* cxx-pretty-print.c (cxx_pretty_printer:simple_type_specifier)
<case DECLTYPE_TYPE>: Handle DECLTYPE_TYPE here instead of ...
(pp_cxx_type_specifier_seq) <case DECLTYPE_TYPE>: ... here.
(cxx_pretty_printer::direct_abstract_declarator) <case DECLTYPE_TYPE>:
New no-op case.
gcc/testsuite/ChangeLog:
PR c++/85278
* g++.dg/concepts/diagnostic9.C: New test.
Diffstat (limited to 'gcc/c/c-parser.c')
0 files changed, 0 insertions, 0 deletions