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]

GCJ does not increment



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



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