|
|
designated initializers
Hello,
I read that in C99, you can use designated initializers:
--------8<-----------------------------
typedef struct{
int a,b;
}my_struct;
my_struct My_Struct={.a=10,.b=20};
-------->8-----------------------------
Thus lcc is C99 conform, I get a "compiler trap" trying to use this.
Regards,
Andreas
|
|
0
|
|
|
|
Reply
|
Andi
|
7/10/2003 5:35:06 AM |
|
"Andi.Martin" <Andi.Martin@freenet.de> wrote in message
news:beitsm$v5v$05$1@news.t-online.com...
> Hello,
>
> I read that in C99, you can use designated initializers:
>
> --------8<-----------------------------
> typedef struct{
> int a,b;
> }my_struct;
>
> my_struct My_Struct={.a=10,.b=20};
> -------->8-----------------------------
>
> Thus lcc is C99 conform, I get a "compiler trap" trying to use this.
LCC_Win32 is not completely C99 conforming, yet. I'm sure Jacob is working
on C99 conformance though.
John
|
|
0
|
|
|
|
Reply
|
John
|
7/10/2003 6:04:38 AM
|
|
|
1 Replies
151 Views
(page loaded in 0.039 seconds)
Similiar Articles: comp.compilers.lcc - page 2designated initializers 1 81 (7/10/2003 5:35:06 AM) Hello, I read that in C99, you can use designated initializers: -----88-----... Andi Dot notation in struct - comp.lang.c... mycdrv_open, > > =A0 =A0 =A0.release =3D mycdrv_release, > > }; > > Its an example of designated initialisation, added by C99. Yes between the braces is an "initializer ... VHDL-2002 vs VHDL-93 vs VHDL-87? - comp.lang.vhdl... that is not of an access type, or a variable of an access type whose designated ... VHDL-2002 vs VHDL-93 vs VHDL-87? - comp.lang.vhdl initializer must be constant error ... C9X Proposal -- Designated Initializers - David M. Keaton Home PageDesignated Initializers David Prosser (dfp summit.novell.com) David Keaton (dmk dmk.com) 20 May, 1995. 1. Introduction 1.1 Purpose. This document specifies the form ... Designated initializers for aggregate types (C only)Designated initializers for aggregate types (C only) Designated initializers, a C99 feature, are supported for aggregate types, including arrays, structures, and unions. 7/27/2012 8:29:43 AM
|
|
|
|
|
|
|
|
|