Re: About nested Designated Initializers

2011-07-19 Thread Cheng Renquan
zers doesn't effect?)  union mbox mbox = { .w[0] = 0x12345678, .s[2] = 0xabcd, .c[6] = 's' }; > members are w, s, and c, not w[0] etc. > > If you want finer-grained control of sub-objects of the union members > then set the elements later via assignment, instead of trying to do it > via initialization. I know that way in above code already, -- Cheng Renquan (程任全)

Re: About nested Designated Initializers

2011-07-19 Thread Cheng Renquan
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

Re: About nested Designated Initializers

2011-07-19 Thread Cheng Renquan
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 ca

About nested Designated Initializers

2011-07-19 Thread Cheng Renquan
NDEX]' designators before an `=' to specify a nested subobject to initialize; the list is taken relative to the subobject corresponding to the closest surrounding brace pair. For example, with the `struct point' declaration above: struct point ptarray[10] = { [2].y = yv2, [2].x = xv2, [0].x = xv0 }; -- Cheng Renquan (程任全)

Re: [PATCH] Add missing variable_size GTY annotations (was Re: on how to compile gcc-4.6 correctly?)

2010-09-14 Thread Dennis, CHENG Renquan
tested and verified that patch works well, gcc-core-4.6-20100911 compiled well on my Ubuntu and Gentoo with my default simplified configuration setting; Tested-by: "Dennis, CHENG Renquan" > > gcc/ChangeLog: > > 2010-09-14  Laurynas Biveinis   > >        * c-lang.h (st

Re: on how to compile gcc-4.6 correctly?

2010-09-14 Thread Dennis, CHENG Renquan
For anyone could succeed compiling gcc-4.6, could you paste a correct ggc_alloc_cleared_lang_type macro ? just run this grep command under your build directory, gcc-4.6-build$ grep -RsInw ggc_alloc_cleared_lang_type gcc/ gcc/gtype-desc.h:2451:#define ggc_alloc_cleared_lang_type() ((struct lang_ty

Re: on how to compile gcc-4.6 correctly?

2010-09-13 Thread Dennis, CHENG Renquan
On Mon, Sep 13, 2010 at 9:32 PM, Laurynas Biveinis wrote: > Thanks. I assume that you pass --enable-languages=c to configure? No, just a very simple configure and make command: ../path/to/gcc-4.6-build$ time { ../gcc-4.6-20100911/configure --prefix=/usr --disable-nls --with-system-zlib && make -

Re: on how to compile gcc-4.6 correctly?

2010-09-13 Thread Dennis, CHENG Renquan
On Mon, Sep 13, 2010 at 8:16 PM, Laurynas Biveinis wrote: > I am the author of how these macros are generated, but somehow I have > missed this thread initially. Could you send me off-list that > gtype-desc.h file? The problematic gtype-desc.h has been sent to Laurynas separately, I was compiling

Re: on how to compile gcc-4.6 correctly?

2010-09-13 Thread Dennis, CHENG Renquan
On Mon, Sep 6, 2010 at 10:51 PM, Kai Ruottu wrote: > This seems to be defined in a header generated during the build > into the $BUILD/gcc : > > [r...@localhost gcc]# grep ggc_alloc_cleared_lang_type *.h > gtype-desc.h:#define ggc_alloc_cleared_lang_type_u() ((union lang_type_u > *)(ggc_internal_c

Re: [RFC] dotgen: Generate Graphiviz format .dot dump of functions cfg

2010-07-14 Thread Dennis, CHENG Renquan
On Mon, Jul 12, 2010 at 1:59 AM, Dennis, CHENG Renquan wrote: > From: Dennis, CHENG Renquan > > The GCC has default support of dumping gimple cfg in vcg format, but when I > was trying to find a tool to interpret the *.006t.vcg dump file, or to > generate > a vector image for

[RFC] dotgen: Generate Graphiviz format .dot dump of functions cfg

2010-07-11 Thread Dennis, CHENG Renquan
From: Dennis, CHENG Renquan The GCC has default support of dumping gimple cfg in vcg format, but when I was trying to find a tool to interpret the *.006t.vcg dump file, or to generate a vector image format, it seemed not easy, the vcgviewer [1] not mature as Graphviz, and Graph::Easy [2] is a