view gcc/testsuite/g++.dg/warn/Wredundant-tags-2.C @ 145:1830386684a0

gcc-9.2.0
author anatofuz
date Thu, 13 Feb 2020 11:34:05 +0900
parents
children
line wrap: on
line source

// PR c++/93138
// { dg-do compile }
// { dg-options "-Wredundant-tags" }

struct Foo
{
  enum Kind { a };
private:
  Kind Kind;
};
enum Foo::Kind foo ();		// { dg-bogus "is private within this context|redundant" }
struct Bar
{
  struct Kind { int a; };
private:
  Kind Kind;
};
struct Bar::Kind bar ();	// { dg-bogus "is private within this context|redundant" }