https://gcc.gnu.org/bugzilla/show_bug.cgi?id=118139
--- Comment #3 from GCC Commits <cvs-commit at gcc dot gnu.org> --- The trunk branch has been updated by Marek Polacek <mpola...@gcc.gnu.org>: https://gcc.gnu.org/g:1bc474f60fde7aba2e00d00f9fa491aff243ecba commit r15-6916-g1bc474f60fde7aba2e00d00f9fa491aff243ecba Author: Marek Polacek <pola...@redhat.com> Date: Thu Dec 19 17:47:03 2024 -0500 c++: handle decltype in nested-name-spec printing [PR118139] Compiling this test, we emit: error: 'static void CW<T>::operator=(int) requires requires(typename'decltype_type' not supported by pp_cxx_unqualified_id::type x) {x;}' must be a non-static member function where the DECLTYPE_TYPE isn't printed properly. This patch fixes that to print: error: 'static void CW<T>::operator=(int) requires requires(typename decltype(T())::type x) {x;}' must be a non-static member function PR c++/118139 gcc/cp/ChangeLog: * cxx-pretty-print.cc (pp_cxx_nested_name_specifier): Handle a computed-type-specifier. gcc/testsuite/ChangeLog: * g++.dg/diagnostic/decltype1.C: New test. Reviewed-by: Jason Merrill <ja...@redhat.com>