blob: 548caac36e977c1945f600dcd632fdbfeac4396b [file] [log] [blame]
// PR c++/51299
// { dg-options "-Wzero-as-null-pointer-constant" }
class Base
{
public:
virtual ~Base();
};
class Derived : public Base
{
};
void foo(Base* b)
{
Derived* d = dynamic_cast<Derived*>(b);
}
void bar(Base& b)
{
Derived& d = dynamic_cast<Derived&>(b);
}