This is the mail archive of the
java-patches@gcc.gnu.org
mailing list for the Java project.
Re: PR java/25429: can't see private static final int CREATE = 1
- From: Tom Tromey <tromey at redhat dot com>
- To: Andrew Haley <aph at redhat dot com>
- Cc: gcc-patches at gcc dot gnu dot org, java-patches at gcc dot gnu dot org
- Date: 15 Dec 2005 09:43:56 -0700
- Subject: Re: PR java/25429: can't see private static final int CREATE = 1
- References: <17313.39915.239402.603593@zapata.pink>
- Reply-to: tromey at redhat dot com
>>>>> "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