[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: Georg-Johann Lay
Subject: [avr-libc-dev] [bug #28837] using PSTR with c++ produces warnings
Date: Sat, 29 Oct 2011 11:44:39 +0000
User-agent: Opera/9.80 (Windows NT 5.0; U; de) Presto/2.6.30 Version/10.63

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

> Backport the gcc fix :-)
> it looks like it could be quite a while before it becomes
> available by normal upgrade.

avr-gcc's PR34734 <http://gcc.gnu.org/PR34734> is fixed in 4.6.2 and GCC 4.6.2
is available, see http://gcc.gnu.org/gcc-4.6

Bugfixes in avr-gcc are not backported to all versions supported by GCC
because of avr-gcc developer shortage. That is: Bugfixes are only backported
from current development trunk (4.7 at the moment) to 4.6.

Even if there was a backport to 4.5, you would still have to get a 4.5.3
distribution or build it yourself, anyway, as it won't tunnel into your local
installation by magic ;-)

#define PROGMEM __attribute__(( section(".progmem.data"))) 
PROGMEM const char string1[] = "String 1";
PROGMEM char string2[] = "String 2";

> error: string2 causes a section type conflict

This is not a avt-libc bug because it is not a PROGMEM define from avr-libc.

And GCC is correect about complaining: Section attributes are drawn from data
properties and they are different but the data is put into the same section.

Using a new compiler version together with the original progmem attribute,
this will result in an error, too, because it is no more legitimate to use
attribute progmem in non-const data.

If you like to write to the data by, say, a bootloader then the data is to be
qualified as volatile const.


Reply to this item at:


  Nachricht geschickt von/durch Savannah

reply via email to

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