This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c++/27336] "this" pointer is not assumed to be not null
- From: "guillaume.melquiond at inria dot fr" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Sat, 20 Aug 2016 05:39:37 +0000
- Subject: [Bug c++/27336] "this" pointer is not assumed to be not null
- Authentication-results: sourceware.org; auth=none
- Auto-submitted: auto-generated
- References: <bug-27336-4@http.gcc.gnu.org/bugzilla/>
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;
}