This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug target/80462] New: [avr] Incorrect "warning: uninitialized variable 'xxx' put into program memory area" for identical strings
- From: "gjl at gcc dot gnu.org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Wed, 19 Apr 2017 09:35:28 +0000
- Subject: [Bug target/80462] New: [avr] Incorrect "warning: uninitialized variable 'xxx' put into program memory area" for identical strings
- Auto-submitted: auto-generated
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=80462
Bug ID: 80462
Summary: [avr] Incorrect "warning: uninitialized variable 'xxx'
put into program memory area" for identical strings
Product: gcc
Version: unknown
Status: UNCONFIRMED
Severity: minor
Priority: P3
Component: target
Assignee: unassigned at gcc dot gnu.org
Reporter: gjl at gcc dot gnu.org
Target Milestone: ---
const __flash char string1[] = "same string";
const __flash char string2[] = "same string";
throws the following incorrect warning when compiled with -Os -Wall
-fmerge-all-constants:
file.c:2:20: warning: uninitialized variable 'string2' put into program memory
area [-Wuninitialized]
const __flash char string2[] = "same string";
^~~~~~~