This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug target/34734] attribute((progmem)) not handled properly in C++ for AVRs
- From: "hsteinhaus at gmx dot de" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 7 Mar 2008 20:59:17 -0000
- Subject: [Bug target/34734] attribute((progmem)) not handled properly in C++ for AVRs
- References: <bug-34734-15604@http.gcc.gnu.org/bugzilla/>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
------- 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