This is the mail archive of the
java@gcc.gnu.org
mailing list for the Java project.
Re: PR java/16927 [Was Re: PATCH for better assertion control.]
- From: Tom Tromey <tromey at redhat dot com>
- To: Andrew Haley <aph at redhat dot com>
- Cc: Per Bothner <per at bothner dot com>, java at gcc dot gnu dot org
- Date: 23 Sep 2004 11:35:47 -0600
- Subject: Re: PR java/16927 [Was Re: PATCH for better assertion control.]
- References: <40526AED.6070807@bothner.com> <40538F72.5030905@bothner.com><16723.2273.470478.699815@cuddles.cambridge.redhat.com>
- Reply-to: tromey at redhat dot com
>>>>> "Andrew" == Andrew Haley <aph@redhat.com> writes:
Andrew> The obvious fix is not to generate code for the assertion at all -- it
Andrew> cannot be executed -- but simply return a null statement. However,
Andrew> you've gone to some trouble here not to do the "obvious" thing. Is
Andrew> there a special reason why? Maybe warnings for unused args or
Andrew> something like that?
My recollection of this is that whether we generate code for
assertions is independent of definite assignment checks. I think code
like this is invalid, but will pass gcj if we simply don't generate
the trees:
final boolean x;
assert x = true;
x = false; // x not definitely unassigned
Tom