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++ PATCH] give builtin types consistent name


On Wed, Oct 4, 2017 at 1:52 PM, Nathan Sidwell <nathan@acm.org> wrote:
> The builtin type machinery is one of the places were we push decls into ::
> under not-their-name.
>
> There's no real reason for this, and the fix is simple -- create a new
> TYPE_DECL if we use a name from the ridpointer table.  I took the
> opportunity of reordering record_builtin_type, which was a series of
> interleaved conditionals dealing with different things.
>
> I add an assert to set_global_binding that the given name is DECL_NAME. Of
> course this raises the opportunity of just making set_global_binding have a
> single arg, like pushdecl and friends.  And then the two macros
> IDENTIFIER_GLOBAL_VALUE and SET_IDENTIFIER_GLOBAL_VALUE could be dispensed
> with and we have simply
>   tree get_global_value (tree identifier);
>   tree set_global_value (tree decl);
> perhaps 's/value/decl/'?
>
> Jason, any preference?

I lean toward "binding".

Jason


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