PR c++/90449 - add -Winaccessible-base option.
authorMatthew Beliveau <mbelivea@redhat.com>
Tue, 11 Jun 2019 15:03:21 +0000 (15:03 +0000)
committerMarek Polacek <mpolacek@gcc.gnu.org>
Tue, 11 Jun 2019 15:03:21 +0000 (15:03 +0000)
commitd3786ebbb06f501be93cceaf087339986e4829c7
treee9d8906df0f5a198c89227bd39ecdfc5ca01878a
parentda10c178007d4edea4ad97f49041c6a6a8c5b02d
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.

From-SVN: r272157
gcc/ChangeLog
gcc/c-family/ChangeLog
gcc/c-family/c.opt
gcc/cp/ChangeLog
gcc/cp/class.c
gcc/doc/invoke.texi
gcc/testsuite/ChangeLog
gcc/testsuite/g++.dg/warn/Winaccessible-base-1.C [new file with mode: 0644]
gcc/testsuite/g++.dg/warn/Winaccessible-base-2.C [new file with mode: 0644]
gcc/testsuite/g++.dg/warn/Winaccessible-virtual-base-1.C [new file with mode: 0644]
gcc/testsuite/g++.dg/warn/Winaccessible-virtual-base-2.C [new file with mode: 0644]