[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[avr-libc-dev] [bug #28837] using PSTR with c++ produces warnings
From: |
Hose Bag |
Subject: |
[avr-libc-dev] [bug #28837] using PSTR with c++ produces warnings |
Date: |
Sun, 07 Feb 2010 23:01:19 +0000 |
User-agent: |
Opera/9.80 (X11; Linux x86_64; U; en) Presto/2.2.15 Version/10.10 |
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] [bug #28837] using PSTR with c++ produces warnings,
Hose Bag <=