This is the mail archive of the gcc-help@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: check that a member function really operates on an object of the expected type


Ian Lance Taylor skrev:
> If you are instead holding a reference to a partially but not completely
> destroyed object, then I agree that dynamic_cast can work correctly.
> However, I personally don't see a sufficient reason to add yet another
> compiler option to support an arguably broken programming style.
>   

The purpose of the compiler option is certainly not to support a broken
programming style, but to detect it! (I recently fixed 2 such bugs in a
software with over 100 000 lines of C++ and would appreciate some help
to see if there are more of them.)


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]