URL: <http://savannah.nongnu.org/bugs/?28837>
Summary: using PSTR with c++ produces warnings Project: AVR C Runtime Library Submitted by: user Submitted on: Sun 07 Feb 2010 11:01:18 PM GMT Category: Header Severity: 3 - Normal Priority: 5 - Normal Item Group: None Status: None Percent Complete: 0% Assigned to: None Open/Closed: Open Discussion Lock: Any Release: 1.6.2 Fixed Release: None _______________________________________________________ Details: warning: only initialized variables can be placed into program memory area this seems to be a regressiong, because it happens with code, that compiled about a year ago (no idea which version, maybe ~2007) without these warnings. this was discussed in the ML 2009/12: http://lists.gnu.org/archive/html/avr-gcc-list/2009-12/msg00016.html locally redefining... #undef PROGMEM #define PROGMEM __attribute__(( section(".progmem.data") )) #undef PSTR #define PSTR(s) (__extension__({static prog_char __c[] PROGMEM = (s); &__c[0];})) ... seems to fix it. what's the "correct" approach to handle this? _______________________________________________________ Reply to this item at: <http://savannah.nongnu.org/bugs/?28837> _______________________________________________ Message sent via/by Savannah http://savannah.nongnu.org/ _______________________________________________ AVR-libc-dev mailing list AVR-libc-dev@nongnu.org http://lists.nongnu.org/mailman/listinfo/avr-libc-dev