blob: 698340d8c65e7dd222edf110469dc0e042a9127c [file] [log] [blame]
// { dg-do compile }
// { dg-additional-options "-std=c++14 -Wno-deprecated" }
// C++17 does not allow dynamic exception specification.
namespace a {
int b;
class c
{
};
}
class g
{
public:
g ();
};
using a::b;
class d
{
public:
d ();
void e ();
};
class f
{
d
i ()
{
static d j;
return d();
}
int *k () throw (a::c);
};
int *f::k () throw (a::c)
{
static g h;
i ();
int l = 2;
while (l)
{
--l;
try
{
operator new (b);
}
catch (a::c)
{
}
}
i ().e ();
return 0;
}