Hi Maarten,
> Can you please verify this also with a larger array? IIRC sdcc checks the
> array size (in bytes) and then decides if it can get away with 8 bit
> calculations.
You are right -- sdcc does check the array length:
demo{1,5,7} work for arr[255], demo{2,3,4,6} fail (my first posting wa
Hi Raphael,
Can you please verify this also with a larger array? IIRC sdcc checks the
array size (in bytes) and then decides if it can get away with 8 bit
calculations.
Greets,
Maarten
> Hi,
>
> SDCC (not restricted to the pic ports) seems to be buggy with array
> indices;
> the problem is visib
Hi,
SDCC (not restricted to the pic ports) seems to be buggy with array
indices;
the problem is visible in the iCode as well.
struct s { int a; int b; char c; } arr[5];
char demo1(unsigned idx) { return arr[idx].c; }
char demo2(unsigned idx) { return arr[idx - 32].c; }
char demo3(unsigned ch