RFA: PATCH to gimple-fold.c for c++/80916, bogus "static but not defined" warning

Jason Merrill jason@redhat.com
Mon Feb 4 21:10:00 GMT 2019


Ping

On Fri, Jan 25, 2019 at 10:06 AM Jason Merrill <jason@redhat.com> wrote:
>
> Here we warn because i<l>::dispatch has internal linkage (because l
> does) and is never instantiated (because the vtable is never emitted).
> The regression happened because devirtualization started adding it to
> cgraph as a possible target.  I think the way to fix this is to avoid
> adding an undefined internal function to cgraph as a possible target,
> since it is not, in fact, possible for it to be the actual target.
>
> I think that the best place to fix this would be in
> can_refer_decl_in_current_unit_p, since the same reasoning applies to
> other possible references.  But we could fix it only in
> gimple_get_virt_method_for_vtable.
>
> First patch tested x86_64-pc-linux-gnu.
>



More information about the Gcc-patches mailing list