public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug target/53935] New: [avr][c++] missing warning for non-const data in progmem
@ 2012-07-12 8:02 gjl at gcc dot gnu.org
2012-07-12 8:04 ` [Bug target/53935] " gjl at gcc dot gnu.org
2023-08-01 19:44 ` gjl at gcc dot gnu.org
0 siblings, 2 replies; 3+ messages in thread
From: gjl at gcc dot gnu.org @ 2012-07-12 8:02 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=53935
Bug #: 53935
Summary: [avr][c++] missing warning for non-const data in
progmem
Classification: Unclassified
Product: gcc
Version: 4.7.1
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: target
AssignedTo: unassigned@gcc.gnu.org
ReportedBy: gjl@gcc.gnu.org
CC: eric.weddington@atmel.com
Target: avr
#define PROGMEM __attribute__((progmem))
const char* PROGMEM arr[] = { "c" };
char foo (void)
{
arr[0] = "x";
}
This C++ mudule puts arr[] in progmem as requested. However, the compiler does
not complain that arr[] needs to be read-only like the C compiler does:
error: variable 'arr' must be const in order to be put into read-only section
by means of '__attribute__((progmem))'
^ permalink raw reply [flat|nested] 3+ messages in thread
* [Bug target/53935] [avr][c++] missing warning for non-const data in progmem
2012-07-12 8:02 [Bug target/53935] New: [avr][c++] missing warning for non-const data in progmem gjl at gcc dot gnu.org
@ 2012-07-12 8:04 ` gjl at gcc dot gnu.org
2023-08-01 19:44 ` gjl at gcc dot gnu.org
1 sibling, 0 replies; 3+ messages in thread
From: gjl at gcc dot gnu.org @ 2012-07-12 8:04 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=53935
Georg-Johann Lay <gjl at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Priority|P3 |P5
Status|UNCONFIRMED |NEW
Last reconfirmed| |2012-07-12
Ever Confirmed|0 |1
Severity|normal |minor
^ permalink raw reply [flat|nested] 3+ messages in thread
* [Bug target/53935] [avr][c++] missing warning for non-const data in progmem
2012-07-12 8:02 [Bug target/53935] New: [avr][c++] missing warning for non-const data in progmem gjl at gcc dot gnu.org
2012-07-12 8:04 ` [Bug target/53935] " gjl at gcc dot gnu.org
@ 2023-08-01 19:44 ` gjl at gcc dot gnu.org
1 sibling, 0 replies; 3+ messages in thread
From: gjl at gcc dot gnu.org @ 2023-08-01 19:44 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=53935
Georg-Johann Lay <gjl at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|NEW |RESOLVED
Resolution|--- |FIXED
Known to work| |8.1.0
Keywords| |addr-space
--- Comment #2 from Georg-Johann Lay <gjl at gcc dot gnu.org> ---
Closed as fixed in v7+.
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2023-08-01 19:44 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-07-12 8:02 [Bug target/53935] New: [avr][c++] missing warning for non-const data in progmem gjl at gcc dot gnu.org
2012-07-12 8:04 ` [Bug target/53935] " gjl at gcc dot gnu.org
2023-08-01 19:44 ` gjl at gcc dot gnu.org
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).