This is the mail archive of the java@gcc.gnu.org mailing list for the Java project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

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


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.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]