[Top][All Lists]

[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;

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:


  Message sent via/by Savannah

reply via email to

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