On Mon, Jun 10, 2019 at 10:19:51AM -0400, Matthew Beliveau wrote: > Hello, > > I've changed the name of warn_about_ambiguous_bases to > maybe_warn_about_inaccessible_bases. > > I've attached the new patch below. > > Best, > Matthew Beliveau > > On Fri, Jun 7, 2019 at 4:42 PM Paolo Carlini <paolo.carl...@oracle.com> wrote: > > > > Hi, > > > > On 07/06/19 22:31, Marek Polacek wrote: > > > On Fri, Jun 07, 2019 at 10:20:02PM +0200, Paolo Carlini wrote: > > >> Hi, > > >> > > >> On 07/06/19 22:10, Matthew Beliveau wrote: > > >>> @@ -6025,6 +6025,10 @@ warn_about_ambiguous_bases (tree t) > > >> Just a nit, but it seems weird to me that the function implementing > > >> warn_inaccessible_base is named warn_about_ambiguous_bases. > > > Maybe, but we want to keep the warning's name in sync with clang, and > > > renaming the function seems like unnecessary noise. I could go either > > > way. > > > > It's definitely a minor issue. But, given that we have a rationale for > > inaccessible_base - I didn't know that - I vote for renaming the > > function. A maybe_* name would be appropriate in that case, because the > > function doesn't always warn. > > > > Paolo. > >
> Bootstrapped/regtested on x86_64-linux, ok for trunk? > > 2019-06-10 Matthew Beliveau <mbeli...@redhat.com> > > PR c++/90449 - add -Winaccessible-base option. > * doc/invoke.texi (Winaccessible-base): Document. > > * c.opt (Winaccessible-base): Added new option. > > * class.c (warn_about_ambiguous_bases): Changed name to: > maybe_warn_about_inaccessible_bases. > (maybe_warn_about_inaccessible_bases): Implemented new > Winaccessible-base warning option for both direct and virtual > base warnings. > (layout_class_type): Call to warn_about_ambiguous_bases changed to fit > new name. > > * g++.dg/warn/Winaccessible-base-1.C: New file. > * g++.dg/warn/Winaccessible-base-2.C: New file. > * g++.dg/warn/Winaccessible-virtual-base-1.C: New file. > * g++.dg/warn/Winaccessible-virtual-base-2.C: New file. Looks fine to me except the small issues with whitespaces in the CL entry. Marek