[Bug target/34734] attribute((progmem)) not handled properly in C++ for AVRs
hsteinhaus at gmx dot de
gcc-bugzilla@gcc.gnu.org
Fri Mar 7 21:00:00 GMT 2008
------- Comment #2 from hsteinhaus at gmx dot de 2008-03-07 20:59 -------
version 4.2.1 seems to be affected as well:
--------------------------------------------
holger@x:~/scratch$ cat foo.cpp
#include <avr/pgmspace.h>
const int foobar1 = 42;
int foobar2 = 42;
const int PROGMEM foobar3 = 42;
int PROGMEM foobar4 = 42;
holger@x:~/scratch$ avr-g++ -Wall -mmcu=atmega1281 -c foo.cpp
foo.cpp:5: warning: only initialized variables can be placed into program
memory area
foo.cpp:6: warning: only initialized variables can be placed into program
memory area
holger@x:~/scratch$ avr-g++ --version
avr-g++ (GCC) 4.2.1 (SUSE Linux)
Copyright (C) 2007 Free Software Foundation, Inc.
This is free software; see the source for copying conditions. There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=34734
More information about the Gcc-bugs
mailing list