Hi,

On 08/22/2014 09:27 PM, Jason Merrill wrote:
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.
Let me think about this. I'm not sure to understand what this boils down to, if we have to seriously restructure what we have got or not. Do you think that we have to track during the recursion in dump_type_suffix that the FUNCTION_TYPE / METHOD_TYPE comes from a pointer?
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.
Ah, Ok, now I see, it's just that volatile member functions aren't *that* common ;)

Paolo.

Reply via email to