This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [C++ RFC/Patch] PR 34938
- From: Jason Merrill <jason at redhat dot com>
- To: Paolo Carlini <paolo dot carlini at oracle dot com>, "gcc-patches at gcc dot gnu dot org" <gcc-patches at gcc dot gnu dot org>
- Date: Fri, 22 Aug 2014 15:27:12 -0400
- Subject: Re: [C++ RFC/Patch] PR 34938
- Authentication-results: sourceware.org; auth=none
- References: <53F78398 dot 2000908 at oracle dot com> <53F7894C dot 8010803 at redhat dot com> <53F797AD dot 5070309 at oracle dot com>
On 08/22/2014 03:19 PM, Paolo Carlini wrote:
Ok. Currently in cases like the present one, dump_type_suffix upon a
pointer recurses and we end up calling pp_cxx_cv_qualifiers on the given
FUNCTION_TYPE / METHOD_TYPE. Thus pp_cxx_cv_qualifiers lacks the pointer
context, just sees the latter. Do you think that the current simple
setup, thus my patch which just extends it, can be incorrect in some cases?
Yes, I think your patch changes it to be incorrect in different cases
than the ones where it's currently incorrect, namely the typedef and
template argument cases that I mentioned.
Incidentally, I don't understand
+ pp_c_ws_string (pp, (func_type && !method_type
vs
+ pp_c_ws_string (pp, (func_type || method_type
Surely the same logic is appropriate for both const and noreturn, and
they are represented the same way on both function_ and method_type.
Jason