On 11/07/2011 04:54 PM, Tom Tromey wrote:
"Jeff" == Jeff Law<l...@redhat.com> writes:
Jeff> So, presumably there's no way to know we're throwing to
Jeff> NullPointerException from the exception information attached to the
Jeff> statement or BB? If not I could disable if the statement with the
Jeff> memory op throws anywhere. It's not ideal, but conservatively correct.
I don't know the answer, but Java uses -fnon-call-exceptions, so maybe
gating it on this would be appropriate. Or, adding a new flag that the
Java FE sets would also be fine by me.
I'm not sure if GCC will currently delete the "if" statement in
try {
x = x.getSomething();
} catch (NullPointerException npe) { }
if (x) ...
but even if it doesn't, the Java front-end should probably reset
flag_delete_null_pointer_checks.
Paolo