RFC: Multiple Java Source Files - Combine Inputs By Default

Ranjit Mathew rmathew@gmail.com
Mon Jun 21 09:16:00 GMT 2004


Hi,
 Per enabled "compiling multiple files at once" support to jc1:
 http://gcc.gnu.org/ml/java/2001-02/msg00058.html
However, for "normal" gcj invocations like:
 gcj --main=Foo Foo.java Bar.java
this is not done unless one uses the "-o" option as well.
This is because:
------------------------- jvspec.c -------------------------
 443 if ((saw_o && java_files_count + class_files_count +
zip_files_count > 1)
 444 || (saw_C && java_files_count > 1)
 445 || (indirect_files_count > 0
 446 && java_files_count + class_files_count +
zip_files_count > 0))
 447 combine_inputs = 1;
------------------------- jvspec.c -------------------------
This might seem trivial, but this causes different code
paths to be taken (and thus possibly different behaviour due
to bugs) depending on whether the user specified "-o" or
not. For an example, see:
 http://gcc.gnu.org/ml/gcc-patches/2004-06/msg01589.html
I suggest that we remove the dependency on "-o" and always
combine input java sources/classes.
Per, is there any particular reason you added that extra
check (shown above)?
Ranjit.


More information about the Java mailing list

AltStyle によって変換されたページ (->オリジナル) /