Hi NG,

is there any way to make g++ (preferably) report
dynamic_cast statements that are unnecessary?
Example:

class A{...};
class B : public A {...};
class C : public B {...};
...
void myFunc(C * obj)
{
  // redundant one...
  ... = dynamic_cast<C*>(obj);
  // ...redundant two
  ... = dynamic_cast<B*>(obj);
}

Andreas
_______________________________________________
help-gplusplus mailing list
help-gplusplus@gnu.org
http://lists.gnu.org/mailman/listinfo/help-gplusplus

Reply via email to