Re: [PATCH 2/3] PR other/61321 - demangler crash on casts in template parameters

2014-11-12 Thread Jason Merrill
Sorry I forgot about this for so long. The patch is OK. Jason

Re: [PATCH 2/3] PR other/61321 - demangler crash on casts in template parameters

2014-11-10 Thread Cary Coutant
Ping. I'm getting more reports of this bug internally, and it would be nice to have the fix upstream. -cary On Mon, Oct 13, 2014 at 11:43 AM, Cary Coutant wrote: > Ping. Jason, do you still think the special-case for conversion ops is > inappropriate? > > -cary > > > On Fri, Jul 25, 2014 at 2:1

Re: [PATCH 2/3] PR other/61321 - demangler crash on casts in template parameters

2014-10-13 Thread Cary Coutant
Ping. Jason, do you still think the special-case for conversion ops is inappropriate? -cary On Fri, Jul 25, 2014 at 2:16 AM, Pedro Alves wrote: > On 07/24/2014 11:35 PM, Cary Coutant wrote: >>> It seems that the problem here is more general; a template argument list is >>> not in scope within t

Re: [PATCH 2/3] PR other/61321 - demangler crash on casts in template parameters

2014-07-25 Thread Pedro Alves
On 07/24/2014 11:35 PM, Cary Coutant wrote: >> It seems that the problem here is more general; a template argument list is >> not in scope within that same template argument list. Can't we fix that >> without special-casing conversion ops? > > I think conversion ops really are a special case. T

Re: [PATCH 2/3] PR other/61321 - demangler crash on casts in template parameters

2014-07-24 Thread Cary Coutant
> It seems that the problem here is more general; a template argument list is > not in scope within that same template argument list. Can't we fix that > without special-casing conversion ops? I think conversion ops really are a special case. It's the only case where the template parameters refer

Re: [PATCH 2/3] PR other/61321 - demangler crash on casts in template parameters

2014-06-02 Thread Jason Merrill
On 05/27/2014 07:57 AM, Pedro Alves wrote: And after the fix for 59195, due to: static void d_print_cast (struct d_print_info *dpi, int options, const struct demangle_component *dc) { ... /* For a cast operator, we need the template parameters from the enclosing

Re: [PATCH 2/3] PR other/61321 - demangler crash on casts in template parameters

2014-05-30 Thread Pedro Alves
On 05/30/2014 07:05 PM, Ian Lance Taylor wrote: >> > Looks good to me. Thanks! Thanks Cary! >> > Ian, does this look good to you? > I tend to defer to Jason on this sort of newfangled mangling > nuttiness, but I can take a look if he doesn't have time. Thanks! FWIW, it'd be great to have this a

Re: [PATCH 2/3] PR other/61321 - demangler crash on casts in template parameters

2014-05-30 Thread Ian Lance Taylor
On Fri, May 30, 2014 at 10:37 AM, Cary Coutant wrote: >> Fix this by adding a new DEMANGLE_COMPONENT_CONVERSION component type, >> which does what DEMANGLE_COMPONENT_CAST does today, and making >> DEMANGLE_COMPONENT_CAST just simply print its component subtree. >> >> I think we could instead reuse

Re: [PATCH 2/3] PR other/61321 - demangler crash on casts in template parameters

2014-05-30 Thread Cary Coutant
> Fix this by adding a new DEMANGLE_COMPONENT_CONVERSION component type, > which does what DEMANGLE_COMPONENT_CAST does today, and making > DEMANGLE_COMPONENT_CAST just simply print its component subtree. > > I think we could instead reuse DEMANGLE_COMPONENT_CAST and in > d_print_comp_inner still d

[PATCH 2/3] PR other/61321 - demangler crash on casts in template parameters

2014-05-27 Thread Pedro Alves
The fix for bug 59195: [C++ demangler handles conversion operator incorrectly] https://gcc.gnu.org/bugzilla/show_bug.cgi?id=59195 unfortunately makes the demangler crash due to infinite recursion, in case of casts in template parameters. For example, with: template struct A {}; template vo