This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug middle-end/31150] [4.1/4.2/4.3 Regression] Not promoting an whole array to be static const
- From: "eres at il dot ibm dot com" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 26 Jun 2007 07:42:45 -0000
- Subject: [Bug middle-end/31150] [4.1/4.2/4.3 Regression] Not promoting an whole array to be static const
- References: <bug-31150-6528@http.gcc.gnu.org/bugzilla/>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
------- Comment #3 from eres at il dot ibm dot com 2007-06-26 07:42 -------
Created an attachment (id=13791)
--> (http://gcc.gnu.org/bugzilla/attachment.cgi?id=13791&action=view)
fix PR31150
Attached is a patch to initialize the scalar elmenets of the array
which should fix this problem.
char str[2][34] = {"a","b"};
==>
str = {};
str[0][0] = 97;
str[1][0] = 98;
I appreciate any comments.
Thanks,
Revital
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=31150