#473 Array indexes are only 16-bit

closed
5
2013-05-25
2003-03-08
Jan Rejlek
No

The compiler silently ignores the bytes 16-23 of array
indexes, as can be seen in the example:

xdata at 0 unsigned char XBYTE[];
int main()
{
XBYTE[0x123456] = 0x55;
}

162 ; test.c:5:
XBYTE[0x123456] = 0x55;
163 ; genPointerSet
003D 90 00 34 56 164 mov dptr,#(_XBYTE + 0x3456)
0041 74 55 165 mov a,#0x55
0043 F0 166 movx @dptr,a
167 ; genLabel
0044 168 00101$:
169 ; genEndFunction
0044 22 170 ret

Discussion

  • Johan Knol

    Johan Knol - 2003-03-12

    Logged In: YES
    user_id=63512

    fixed in src/ds390/gen.c:1.176

     
  • Johan Knol

    Johan Knol - 2003-03-12
    • milestone: --> fixed
    • assigned_to: nobody --> johanknol
    • status: open --> closed
     

Log in to post a comment.

Get latest updates about Open Source Projects, Conferences and News.

Sign up for the SourceForge newsletter:

JavaScript is required for this form.





No, thanks