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

Andrew Haley aph@redhat.com
Fri Sep 24 08:49:00 GMT 2004


Per Bothner writes:
 > Andrew Haley wrote:
 > 
 > > The obvious fix is not to generate code for the assertion at all -- it
 > > cannot be executed -- but simply return a null statement.  However,
 > > you've gone to some trouble here not to do the "obvious" thing.  Is
 > > there a special reason why?  Maybe warnings for unused args or
 > > something like that?
 > 
 > As I recall: yes.  More generally, to catch errors.
 > 
 > I don't remember the hows and whys of patch_string to know if your
 > patch is correct.  It does seem like a kludge, but so does the
 > mechanism of patch_string.  I don't remember why Alex did it this
 > way:  One would think there must be a cleaner way

Indeed.  However, I'm pretty sure that patch_string does do the right
thing, and that calling it at this point solves the problem.  But the
whole approach of patching tree nodes is fraught with problems.

Andrew.



More information about the Java mailing list