This is the mail archive of the
java@gcc.gnu.org
mailing list for the Java project.
Re: PR 1159/1412
Per Bothner writes:
> Andrew Haley <aph@cambridge.redhat.com> writes:
>
> > Constant folding. However, we can't do this on bytecode until we have
> > a version of fold() that obeys Java semantics.
>
> I missed the specifics of this problem. Could you summarize?
Constant folding in gcc can turn references into bit field references,
which have no bytecode equivalent. I'm fairly sure that there are
other examples where fold(), which is very C-centric, doesn't do the
Right Java Thing.
> A simple version of constant-folding can probably be made part
> of java_complete_lhs fairly easily.
Yes, that would not be a bad idea.
Andrew.