This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [C++ RFC/Patch] PR 34938


Hi again,

On 08/22/2014 09:33 PM, Paolo Carlini wrote:
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?
Like the below, which I'm finishing testing?

Note that apparently this regressed in 4.9, after some clean ups and C++ work to the diagnostic committed by Gaby. Thus maybe eventually we want to fix the issue in the release branch too.

Thanks,
Paolo.

PS: Something I also noticed is that we ignore the noreturn attribute in:

typedef void (A::*ptrmf)() __attribute((noreturn));

I don't remember a Bugzilla for that, but I suppose it should be fine. clang doesn't complain for sure. And what about references?

typedef void (&fref)() __attribute((noreturn));

/////////////////////////

Attachment: patch_34938_2
Description: Text document


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]