This is the mail archive of the
mailing list for the GCC project.
PATCH for better assertion control.
- From: Per Bothner <per at bothner dot com>
- To: gcc-patches at gcc dot gnu dot org, java at gcc dot gnu dot org
- Date: Fri, 12 Mar 2004 17:59:09 -0800
- Subject: PATCH for better assertion control.
This patch support new --enable-assertions[=class-or-package]
and --disable-assertions[=class-or-package] options. The default
is assertion are disabled if optimizing and not generating
classes, but this can be overridden.
Note that "disabling" means we don't generate code to check
assertions. "Enabling" means we generate code to check
assrtions, but that doesn't mean we actually check then.
For that you need to also enable asserations are run-time.
Sun's java command has such an option, but we don't so far.
I'll send a documentation patch before I check this is in.
A bonus part of this patch (which couls probably be split out)
is the change to build_incomplete_class_ref. This handles assert
and ".class" in inner classes inside a top-level interface.
Tested on Fedora1 with no regressions.