[PATCH] Fix DEMANGLE_COMPONENT_TEMPLATE_ARGLIST demangling (PR other/43838)

Ian Lance Taylor iant@google.com
Thu Jun 10 00:17:00 GMT 2010


Jakub Jelinek <jakub@redhat.com> writes:

> On Wed, Jun 09, 2010 at 01:03:08PM -0700, Ian Lance Taylor wrote:
>> I suppose this is OK, but it seems simpler and cleaner to just check
>> whether the d_print_comp will print anything before appending the
>> comma.  It seems like it should work to do
>> 
>>     struct demangle_component *right = d_right (dc);
>>     if (right != NULL && (d_left (right) != NULL || d_right (right) != NULL))
>>       {
>>         d_append_string (dpi, ", ");
>>         d_print_comp (dpi, right);
>>       }
>
> I believe e.g. DEMANGLE_COMPONENT_PACK_EXPANSION can print nothing
> if d_find_pack returns non-NULL, but d_pack_length is 0.
> Not sure if that's the only possibility.

I don't quite see how that can happen, but I don't have time to look
into this, so I'll approve your patch.

Ian



More information about the Binutils mailing list