On Fri, 24 May 2019 at 16:34, Nathan Sidwell <nat...@acm.org> wrote:
>
> Currently gcc/tree.c exports an anonymous name format string, and a
> predicate to detect identifiers of that form.  The C++ and D FEs use
> those functions to create and check anonymous names.
>
> That seems a little duplicative.  This patch changes tree.c to export an
> anonymous name generator, and uses a spare bit in IDENTIFIERs to mark
> them as anonymous, so no more strcmp to distinguish them.  Then replaces
> the bespoke handling in the two front ends to use the new interface.
>
> While my original goal was to make there be only one anon-identifier in
> the C++ FE (because modules kind of would prefer not to have names
> depend on source ordering), I didn't get to that goal, I think we still
> sometimes place them in symbol tables.  But this still seems a good thing.
>
> Are the common and D pieces ok?
>

Seems reasonable to me.  Don't have a strong opinion either on how it's done.

-- 
Iain

Reply via email to