#include <stdio.h> struct A { A (void) {} virtual ~A (void) {} A (const A&) = delete; void operator= (const A&) = delete; }; struct B : public A { B (const char* p) :A(),_p(p) {} const char* _p; }; int main (void) { B b ("hello"); puts (b._p); return 0; } When compiling with -Weffc++ enabled, generates: t.cc:10:8: warning: ‘struct B’ has pointer data members [-Weffc++] struct B : public A { ^ t.cc:10:8: warning: but does not override ‘B(const B&)’ [-Weffc++] t.cc:10:8: warning: or ‘operator=(const B&)’ [-Weffc++] B already has an implicitly deleted copy constructor and operator= because A implements them deleted. The compiler will correctly give a warning about it on B b2=b, for example.
There are loads of problems with -Weffc++, all related to the fact they are outdated rules based on the first edition of a book based on C++98. This seems like a dup of PR 22406 *** This bug has been marked as a duplicate of bug 22406 ***