[Bug c++/70295] [6 Regression] bogus -Wnonnull-compare for "dynamic_cast<const FuSelection *>(this) != nullptr"
jakub at gcc dot gnu.org
gcc-bugzilla@gcc.gnu.org
Fri Mar 18 14:50:00 GMT 2016
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=70295
Jakub Jelinek <jakub at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|UNCONFIRMED |NEW
Last reconfirmed| |2016-03-18
CC| |jakub at gcc dot gnu.org
Ever confirmed|0 |1
--- Comment #3 from Jakub Jelinek <jakub at gcc dot gnu.org> ---
Let's make it
struct A { A (); virtual ~A (); bool foo (bool); };
struct B : virtual public A { B (); virtual ~B (); };
bool
A::foo (bool x)
{
if (x && dynamic_cast<B *>(this) != nullptr)
return true;
return false;
}
then.
More information about the Gcc-bugs
mailing list