(root)/
gcc-13.2.0/
gcc/
testsuite/
g++.dg/
ext/
attr-unavailable-3.C
/* Check operator with __attribute__((unavailable)) */
/* { dg-do compile } */
/* { dg-options "" } */

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

void g(void)
{
  Foo f;
  (int)f; // { dg-error "'Foo::operator int\\(\\)' is unavailable" }
}