--disable-assertions does not work when compiling from .class
Sergio Queiroz
srmq@srmq.org
Fri Sep 2 13:51:00 GMT 2005
Em 2005年9月02日 16:34:21 +0530, Ranjit Mathew escreveu:
> To implement what you want, GCJ would have to recognise such patterns in
> class files generated by itself, by javac, by ECJ, by Jikes, etc. -
> needless to say, this is rather difficult and does not provide much
> benefit.
So, it would be nice to at least have in the GCJ documentation an
explanation that --disable-assertions is only meaninful when compiling
from source. With the current statement "By default, assertions are
enabled when generating class files or when not optimizing, and disabled
when generating optimized binaries." we think that GCJ will disable
assertions when generating binaries even from .class files, as nothing is
said that it will do differently.
And why the proprietary JDKs can disable at runtime the use of assertions
(with "java -disableassertions") for .class files generated by javac, ECJ,
Jikes etc. (with the assert portions in it)? Isn't there an agreed
structure for an assertion?
--
Sergio Queiroz
More information about the Java
mailing list