This is the mail archive of the java-patches@gcc.gnu.org mailing list for the Java 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]

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


>>>>> "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


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