view gcc/testsuite/g++.dg/cpp1y/attributes-enum-1.C @ 131:84e7813d76e9

gcc-8.2
author mir3636
date Thu, 25 Oct 2018 07:37:49 +0900
parents 04ced10e8804
children
line wrap: on
line source

// PR c/47043
// { dg-do compile { target c++14 } }

class C
{
public:
  enum Foo
  {
    T,
    U [[deprecated("unused")]],
    V
  };
};

template<typename Tp>
  class D
  {
  public:
    enum Bar
    {
      X,
      Y [[deprecated("unused")]],
      Z
    };
  };

int
f (int i)
{
  auto j = C::U; // { dg-warning ".U. is deprecated" }

  auto k = D<int>::Y; // { dg-warning ".Y. is deprecated" }

  return i;
}