GCJ does not increment

Aneesh Aggarwal aneesha@granite.hpl.hp.com
Mon Jun 11 19:04:00 GMT 2001


This is for version 3.1. When the increment operator "++" is used in
conjunction with arrays, there is a problem. If the "++" operator is
appended i.e say a[i]++, then the increment is done, but if the operator
is in front i.e ++a[i], then the increment is not done.
I tested it on the following program :
public class inc_test {
 public static void main(String [] args) {
 long a[];
 a = new long[2];
 for(int i = 0; i < 2; i++) {
 ++a[i];
 System.out.println(" Value " + a[i]);
 }
 }
 }
I have also filed a bug-report (identification java/3096). I thought I'll
mention it here so that it gets some attention.
-Aneesh


More information about the Java mailing list

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