PR java/16927 [Was Re: PATCH for better assertion control.]

Andrew Haley aph@redhat.com
Thu Sep 23 17:43:00 GMT 2004


Tom Tromey writes:
 > >>>>> "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
Oh, I see! Thanks. I'll call patch_string() in the appropriate
place.
Andrew.


More information about the Java mailing list

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