https://gcc.gnu.org/bugzilla/show_bug.cgi?id=93801
Bug ID: 93801 Summary: False -Wmismatched-tags upon redundant typename Product: gcc Version: 10.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: c++ Assignee: unassigned at gcc dot gnu.org Reporter: sbergman at redhat dot com CC: msebor at gcc dot gnu.org Target Milestone: --- With recent GCC trunk: > $ cat test.cc > namespace N { struct S {}; } > typename N::S s; > > $ g++ -fsyntax-only -Wmismatched-tags test.cc > test.cc:2:13: warning: ‘N::S’ declared with a mismatched class-key ‘class’ > [-Wmismatched-tags] > 2 | typename N::S s; > | ^ > test.cc:2:13: note: remove the class-key or replace it with ‘struct’ > test.cc:1:22: note: ‘N::S’ defined as ‘struct’ here > 1 | namespace N { struct S {}; } > | ^