stage3/array_range_check.cc
changeset 594 c8092e909886
parent 592 99a284cec1f2
child 598 0b1ee7e7123b
equal deleted inserted replaced
593:412780374bd3 594:c8092e909886
   133       {STAGE3_ERROR(0, symbol, symbol, "Array access out of bounds."); continue;}
   133       {STAGE3_ERROR(0, symbol, symbol, "Array access out of bounds."); continue;}
   134 
   134 
   135     if ( VALID_CVALUE(uint64, l->elements[i]) && VALID_CVALUE(uint64, dimension->upper_limit))
   135     if ( VALID_CVALUE(uint64, l->elements[i]) && VALID_CVALUE(uint64, dimension->upper_limit))
   136       if ( GET_CVALUE(uint64, l->elements[i])   >  GET_CVALUE(uint64, dimension->upper_limit))
   136       if ( GET_CVALUE(uint64, l->elements[i])   >  GET_CVALUE(uint64, dimension->upper_limit))
   137       {STAGE3_ERROR(0, symbol, symbol, "Array access out of bounds."); continue;}
   137       {STAGE3_ERROR(0, symbol, symbol, "Array access out of bounds."); continue;}
       
   138       
       
   139     /* TODO: what happens when one has a int64 cvalue, and another has a uint64 cvalue? */
   138   }
   140   }
   139 }
   141 }
   140 
   142 
   141 
   143 
   142 
   144