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

Manuel López-Ibáñez <manu at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
            Summary|"this" pointer is not       |delete null checks in
                   |assumed to be not null      |callers to nonnull
                   |                            |functions

--- Comment #10 from Manuel López-Ibáñez <manu at gcc dot gnu.org> ---
For the following:

struct B { int x; };
extern void g3(struct B *that)  __attribute__((nonnull));
bool f3(struct B *a) {
  g3(a);
  return a;
}

The GIMPLE dump for C and C++ looks the same, but the NULL check in C++ does
not get optimized out.

Reply via email to