Follow-up Comment #3, bug #31613 (project avr-libc):
> but I cannot see an error in the attached example.
The error is:
unsigned int *ptab;
Make this:
unsigned char *ptab;
and it will work as expected. The pointer *points* to a
"char" object, yet the pointer itself (i.e., the temporary
variable "ptab") is 16 bits wide anyway.
Despite, useless use of a pointer variable.
j = pgm_read_byte(testtab + yy);
would work without problems, as would
j = pgm_read_byte(&testtab[yy]);
Please, use the avr-gcc-list for that kind of questions.
_______________________________________________________
Reply to this item at:
<http://savannah.nongnu.org/bugs/?31613>
_______________________________________________
Message sent via/by Savannah
http://savannah.nongnu.org/
_______________________________________________
AVR-libc-dev mailing list
[email protected]
http://lists.nongnu.org/mailman/listinfo/avr-libc-dev