[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[avr-gcc-list] RE: possible bug in avr-gcc 4.3.2?

From: Zoran Rilak
Subject: [avr-gcc-list] RE: possible bug in avr-gcc 4.3.2?
Date: Sat, 23 May 2009 13:50:02 -0400

On second thought, perhaps the bug is in my understanding of how it
works.  In the following block:

char dow0[] PROGMEM = "Ned";
char dow1[] PROGMEM = "Pon";
char dow2[] PROGMEM = "Uto";
char dow3[] PROGMEM = "Str";
char dow4[] PROGMEM = "Stv";
char dow5[] PROGMEM = "Pia";
char dow6[] PROGMEM = "Sob";

PGM_P dow[] PROGMEM = { dow0, dow1, dow2, dow3, dow4, dow5, dow6 };

k = 0;
lcd_write_int16(dow[0]);  // address of dow0
lcd_write_int16(dow[k]);  // something unrelated

is it possible that the compiler does automatic replacement of dow[0]
with dow0, which is as intended, while dow[k] gets dereferenced as a
pointer to data memory?


reply via email to

[Prev in Thread] Current Thread [Next in Thread]