On 20 July 2011 01:04, Jonathan Wakely wrote:
>
> C99 doesn't even support .c[6] syntax for initializers, it's a GCC extension.
Apologies, C99 does support that, my mistake.
But you can still only initialize one member of a union.
On Tue, Jul 19, 2011 at 5:04 PM, Jonathan Wakely wrote:
> This isn't the right list for that either. Questions about using gcc
> should go to gcc-help, bug reports should go to bugzilla.
I know how to use current gcc implementation correctly, I'm thinking
of a new feature in future gcc version,
On 20 July 2011 00:45, Cheng Renquan wrote:
> On Tue, Jul 19, 2011 at 4:18 PM, Jonathan Wakely
> wrote:
>> This question is more suitable for the gcc-help list, as it is a
>> question about using gcc not about developing it.
>
> What I insist to discuss here is I think this may be a gcc's bug,
T
On Tue, Jul 19, 2011 at 4:18 PM, Jonathan Wakely wrote:
> This question is more suitable for the gcc-help list, as it is a
> question about using gcc not about developing it.
What I insist to discuss here is I think this may be a gcc's bug,
could be fixed in some future day?
>
> What you want is
On 19 July 2011 23:57, Cheng Renquan wrote:
> On Tue, Jul 19, 2011 at 2:56 PM, Cheng Renquan wrote:
>> Hi all,
>>
>> From info gcc I know it accepts a series of `.FIELDNAME' and `[INDEX]'
>> designators,
>> like
>>
>> struct point ptarray[10] = { [2].y = yv2, [2].x = xv2, [0].x = xv0 };
>>
>>
On Tue, Jul 19, 2011 at 2:56 PM, Cheng Renquan wrote:
> Hi all,
>
> From info gcc I know it accepts a series of `.FIELDNAME' and `[INDEX]'
> designators,
> like
>
> struct point ptarray[10] = { [2].y = yv2, [2].x = xv2, [0].x = xv0 };
>
>
> But in my case, I have a struct with array of int as
Hi all,
From info gcc I know it accepts a series of `.FIELDNAME' and `[INDEX]'
designators,
like
struct point ptarray[10] = { [2].y = yv2, [2].x = xv2, [0].x = xv0 };
But in my case, I have a struct with array of int as members,
struct mbox {
int x[20];
int y[20];