[Bug c++/69970] Surprising warning with -Wnonnull-compare - 'this' compared to NULL

rguenth at gcc dot gnu.org gcc-bugzilla@gcc.gnu.org
Fri Feb 26 09:14:00 GMT 2016


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

--- Comment #1 from Richard Biener <rguenth at gcc dot gnu.org> ---
You are comparing this against null when invoking the constructor and the
compiler tells you the code is equivalent to

  Bar ()
  : foo_ (new (true))
  {}


More information about the Gcc-bugs mailing list