This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug c++/27336] "this" pointer is not assumed to be not null


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

--- Comment #8 from Guillaume Melquiond <guillaume.melquiond at inria dot fr> ---
It is partly fixed. In callee position, GCC now knows that "this" is non-null.
But in caller position, GCC still cannot make use of that information to remove
non-null checks from dynamic casts. The following testcase is still relevant.

struct A { void g(); };
bool f(A *a) {
  a->g();
  return a;
}

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]