PR java/25429: can't see private static final int CREATE = 1

Tom Tromey tromey@redhat.com
Thu Dec 15 16:49:00 GMT 2005


>>>>> "Andrew" == Andrew Haley <aph@redhat.com> writes:

I was just writing a comment in the RH PR ...

Andrew> +             if (nested_member_access_p (current_class, decl)
Andrew> +                 && ! (JDECL_P (decl) && CLASS_FINAL_VARIABLE_P (decl)
Andrew> +                       && DECL_INITIAL (decl) != NULL_TREE))

I'm not sure about this patch.  It seems to me that the test has to be
for whether the field's value is inlineable, i.e., the DECL_INITIAL is
a constant expression.

For instance, won't this skip the accessor if we see:

    private static final Object FIELD = new Object();

... but that would be wrong.

Tom



More information about the Java-patches mailing list