avr-libc-dev
[Top][All Lists]
Advanced

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

[avr-libc-dev] [bug #28837] using PSTR with c++ produces warnings


From: Volker Kuhlmann
Subject: [avr-libc-dev] [bug #28837] using PSTR with c++ produces warnings
Date: Sat, 29 Oct 2011 01:06:21 +0000
User-agent: Mozilla/5.0 (compatible; Konqueror/4.6; Linux) KHTML/4.6.0 (like Gecko) SUSE

Follow-up Comment #2, bug #28837 (project avr-libc):

The approach of redefining PROGMEM to
#define PROGMEM _attribute_(( section(".progmem.data") )) 
works, but is sensitive to storage class specification.


#include <avr/pgmspace.h>
#undef PROGMEM 
#define PROGMEM __attribute__(( section(".progmem.data") )) 
PROGMEM const char string1[] = "String 1";
PROGMEM char string2[] = "String 2";
int main(void) {
    return 1;
}


gives
error: string2 causes a section type conflict

Program memory is read-only flash memory so not using const is a bug.
Unfortunately it seems avr-libc is pretty buggy here...

    _______________________________________________________

Reply to this item at:

  <http://savannah.nongnu.org/bugs/?28837>

_______________________________________________
  Message sent via/by Savannah
  http://savannah.nongnu.org/




reply via email to

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