[Bug c++/69850] [6 Regression] unnecessary -Wnonnull-compare warning

trippels at gcc dot gnu.org gcc-bugzilla@gcc.gnu.org
Thu Feb 18 12:33:00 GMT 2016


https://gcc.gnu.org/bugzilla/show_bug.cgi?id=69850

--- Comment #7 from Markus Trippelsdorf <trippels at gcc dot gnu.org> ---
(wow, llvm approaches Boost in the complexity of testcases. It takes ages to
reduce them.) 


class RefCountedBaseVPTR {
  virtual ~RefCountedBaseVPTR();
  void Release() const { delete this; }
  template <typename> friend struct A;
};
template <typename T> struct A {
  static void release(T *p1) { p1->Release(); }
};
template <typename T> class B {
  T Obj;
public:
  void reset() { A<T>::release(&Obj); }
};
class C {
  class Payload : public RefCountedBaseVPTR {
    ~Payload();
  };
  void reset();
  B<Payload> Value;
};
void C::reset() { Value.reset(); }


More information about the Gcc-bugs mailing list