This is the mail archive of the binutils@sourceware.org mailing list for the binutils 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: [PATCH] Fix DEMANGLE_COMPONENT_TEMPLATE_ARGLIST demangling (PR other/43838)


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


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