summaryrefslogtreecommitdiff
path: root/gcc/testsuite/g++.dg/warn/deprecated-3.C
blob: 8b4378c410b8f0e61c76bddfab2c94e7002faafc (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
/* PR 17947 bad warning with implicit conversion and __attribute__((deprecated)) */
/* { dg-do compile } */
/* { dg-options "" } */

struct Foo
{
  operator int() __attribute__((deprecated));
};

void g(void)
{
  Foo f;
  (int)f; // { dg-warning "'Foo::operator int\\(\\)' is deprecated \\(declared at" }
}