This is the mail archive of the
java-patches@gcc.gnu.org
mailing list for the Java project.
Re: java.io.File
Jeff Sturm <jsturm@one-point.com> writes:
> On Mon, 2 Apr 2001, Bryce McKinlay wrote:
> > Good point. That part of the patch is actually questionable for another
> > reason, which is that init_native is resetting a final variable. That could
> > cause problems if the compiler ever decided to treat File.fileSeparator as a
> > null constant.
>
> I'm not sure that would be a good optimization. It'd cause problems with
> System.out, for one thing.
The compiler is only allowed to inline final static fields that are
initialized to compile-time constants.
--
--Per Bothner
per@bothner.com http://www.bothner.com/~per/