This is the mail archive of the
java@gcc.gnu.org
mailing list for the Java project.
Re: gcj -c -d ?
Norman Hendrich wrote:
2) When trying to compile with -O2 -static, as suggested by Jeff,
gcj was flooding me with "unreachable bytecode" warnings,
which effectively hid the more important messages.
I would prefer if the "unreachable bytecode" warnings were turned
off, unless expicitly enabled (like -Wall).
This is a bug in the class-file generation. I guess we never got around
to fixing it.
3) Why does gcj -c Foo.java prints a warning message, when Foo.java
is newer than Foo.class? OK, I know that compiling from source
is still not as robust as compiling from classes...
It may not be quite as robust, but it's close enough, and it does
generate better code, so that is what we recommend.
The reason for the warning is that it is unclear what the user wants.
Even when compiling from source, we try to use bytecode for those
classes for that are being referenced in the code but not actually
being compiled (i.e. mentioned on teh command line). Reading a
class file is faster at compiel time. However, if the source file
is newer, it means the class file is out-of-date, and it needs to
be re-compiled.
--
--Per Bothner
per@bothner.com http://www.bothner.com/per/