https://gcc.gnu.org/bugzilla/show_bug.cgi?id=12277
Ville Voutilainen <ville.voutilainen at gmail dot com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |ville.voutilainen at gmail dot com --- Comment #9 from Ville Voutilainen <ville.voutilainen at gmail dot com> --- (In reply to Andrew Dixie from comment #7) > With final, I believe the following dynamic_cast must always return NULL: > > struct a1 { virtual ~a1() {} }; > struct a2 final { virtual ~a2() {} }; > > bool test(a1 *x) > { > return dynamic_cast<a2 *>(x) != 0; > } If a1 is final, sure. Whether a2 is final is irrelevant.