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