https://gcc.gnu.org/bugzilla/show_bug.cgi?id=93138
--- Comment #3 from Jakub Jelinek <jakub at gcc dot gnu.org> --- Author: jakub Date: Sun Jan 5 12:50:40 2020 New Revision: 279886 URL: https://gcc.gnu.org/viewcvs?rev=279886&root=gcc&view=rev Log: PR c++/93138 * parser.c (cp_parser_check_class_key): Disable access checks for the simple name lookup. (cp_parser_maybe_warn_enum_key): Likewise. Return early if !warn_redundant_tags. * g++.dg/warn/Wredundant-tags-2.C: New test. Added: trunk/gcc/testsuite/g++.dg/warn/Wredundant-tags-2.C Modified: trunk/gcc/cp/ChangeLog trunk/gcc/cp/parser.c trunk/gcc/testsuite/ChangeLog