This is the mail archive of the gcc-help@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] |
Referring to section 5.21 of the docs - Designated Initializers
typedef struct { int a; int b; } foo;
Is there a way I can get this effect
foo myfoo = { .a = 0, .b = 0 };
without specifying each field? I just want the whole structure initialized to zero.
foo myfoo;
then I get 'use of uninitialized value' errors in valgrind.
Index Nav: | [Date Index] [Subject Index] [Author Index] [Thread Index] | |
---|---|---|
Message Nav: | [Date Prev] [Date Next] | [Thread Prev] [Thread Next] |