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.]


>>>>> "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


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