This is the mail archive of the
gcc-help@gcc.gnu.org
mailing list for the GCC project.
Re: Array Initialization warnings
- From: bjorn rohde jensen <shamus at tdcadsl dot dk>
- To: gcc-help at gcc dot gnu dot org
- Date: Sat, 20 Apr 2002 17:34:50 +0200
- Subject: Re: Array Initialization warnings
- References: <3CC180E1.9050109@keyed-upsoftware.com>
- Reply-to: shamus at tdcadsl dot dk
Hi David,
> Just to clarify...the standard requires the brackets be placed as in
> your example? If so, guess I had best get to bracketing my arrays.
>
It is pretty much up to you, how you handle your arrays. You can
certainly use multi dimentional arrays and initialise them as such,
or you could use one dimentional arrays and initialise them as such.
There is nothing wrong with interpreting an x dimentional array as an
y dimentional array, i am just saying, that you ought to be consistent.
Your original code depended on a particular physical layout of the
array. I am not sure, that physical layout is required by the standard.
>I really did not want to have to go back and recode my array that looks
>like this:BYTE SUBIMG_NTSC[2][2][4][3][8] = {...
You might want to wait with a rewrite, until someone makes
a stronger statement about this;)
Yours sincerely,
bjorn