On 11/10/20 8:57 PM, Alan Modra wrote:
> On Tue, Nov 10, 2020 at 11:45:37AM -0700, Jeff Law wrote:
>> On 11/12/19 11:28 PM, Strager Neds wrote:
>>> * gcc/cgraph.h (symtab_node::get_section): Constify.
>>> (symtab_node::set_section): Declare new overload.
>>> * gcc/symtab.c (symtab_node::set_section): Define new overload.
>>> (symtab_node::copy_visibility_from): Use new overload of
>>> symtab_node::set_section.
>>> (symtab_node::resolve_alias): Same.
>>> * gcc/tree.h (set_decl_section_name): Declare new overload.
>>> * gcc/tree.c (set_decl_section_name): Define new overload.
>>> * gcc/c/c-decl.c (merge_decls): Use new overload of
>>> set_decl_section_name.
>>> * gcc/cp/decl.c (duplicate_decls): Same.
>>> * gcc/cp/method.c (use_thunk): Same.
>>> * gcc/cp/optimize.c (maybe_clone_body): Same.
>>> * gcc/d/decl.cc (finish_thunk): Same.
>>> * gcc/tree-emutls.c (get_emutls_init_templ_addr): Same.
>>> * gcc/cgraphclones.c (cgraph_node::create_virtual_clone): Use new
>>> overload of symtab_node::set_section.
>>> (cgraph_node::create_version_clone_with_body): Same.
>>> * gcc/trans-mem.c (ipa_tm_create_version): Same.
>> I adjusted the ChangeLog, added an entry for the coroutines.cc addition
>> I made and pushed this to the trunk.
> /home/alan/src/gcc/gcc/go/go-gcc.cc:2759:44: error: call of overloaded 
> ‘set_decl_section_name(tree_node*&, std::nullptr_t)’ is ambiguous
>        set_decl_section_name (var_decl, NULL);
>                                             ^
> In file included from /home/alan/src/gcc/gcc/go/go-gcc.cc:27:0:
> /home/alan/src/gcc/gcc/tree.h:4283:13: note: candidate: void 
> set_decl_section_name(tree, const char*)
>  extern void set_decl_section_name (tree, const char *);
>              ^~~~~~~~~~~~~~~~~~~~~
> /home/alan/src/gcc/gcc/tree.h:4284:13: note: candidate: void 
> set_decl_section_name(tree, const_tree)
>  extern void set_decl_section_name (tree, const_tree);
>              ^~~~~~~~~~~~~~~~~~~~~
>
> I'm using the obvious to me "(const char *) NULL" in the call to fix
> this, but you might like a different style C++ fix instead.

Ugh.  I don't typically build go.  Sorry about that.  Funny thing is I
saw the NULL when I was looking for other instances of
set_decl_section_name that should have been converted.  But the fact
that it would trigger an ambiguous overload didn't cross my mind.


I think the const char * is fine.  That should force resolution to the
same routine we were using earlier.  Do you want to commit that fix or
shall I?


jeff

Reply via email to