This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug middle-end/31150] [4.1/4.2/4.3 Regression] Not promoting an whole array to be static const



------- 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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]