problem with java option -femit-class-files

Jeff Sturm jsturm@one-point.com
Fri Jun 15 06:40:00 GMT 2001


On Fri, 15 Jun 2001, Herman ten Brugge wrote:
> I found a problem with java compiler option '-femit-class-files'.
> If the code below (fail.java) is compiled with this option a SEGV occurs:
> 
> public class fail { static String[] error = { "error" }; }

Thanks for the report.  The quick explanation is that -femit-class-files
isn't intended to be used that way.  If you want a .class file, compile
with "gcj -C".  (The -C flag causes the language driver to pass both
-femit-class-files and -fsyntax-only to jc1.)

However, a SIGSEGV isn't the best way to handle this.  The gcj compiler
should complain about unsupported options.  Could you enter a bug in GNATS
for this?

Jeff




More information about the Gcc-bugs mailing list