This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [C++ PATCH] give builtin types consistent name
- From: Jason Merrill <jason at redhat dot com>
- To: Nathan Sidwell <nathan at acm dot org>
- Cc: GCC Patches <gcc-patches at gcc dot gnu dot org>
- Date: Wed, 4 Oct 2017 14:03:35 -0400
- Subject: Re: [C++ PATCH] give builtin types consistent name
- Authentication-results: sourceware.org; auth=none
- References: <012eb489-2db5-1fba-6041-7ed18b4d286a@acm.org>
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