https://gcc.gnu.org/bugzilla/show_bug.cgi?id=102036
Martin Sebor <msebor at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
See Also| |https://gcc.gnu.org/bugzill
| |a/show_bug.cgi?id=103703
--- Comment #3 from Martin Sebor <msebor at gcc dot gnu.org> ---
G++ also doesn't warn for more involved cases like the one in pr103703 (with
the ICE fixed):
template <typename T>
struct A
{
struct B { };
};
template <typename T>
struct C
{
friend class A<C>::B; // { dg-warning "-Wmismatched-tags" "pr102036" {
xfail *-*-* } }
};
template struct C<int>;
Clang warns for the above but also suffers from a false positive below:
template <typename T>
struct D
{
friend class A<D>::B; // okay, specialized as class below
};
template <>
struct A<long>
{
class B { };
};
template struct D<long>;