Re: Please support coo.h

2010-06-11 Thread yuanbin
I am familiar with C++, Do not recommend C++ to me. gcc initial the first member of union now, This is not the C standard also. I just want gcc initial the last member of union with some switch. 2010/6/11 Magnus Fromreide ma...@lysator.liu.se: On Fri, 2010-06-11 at 08:44 +0800, yuanbin wrote

Re: [Tinycc-devel] Please support coo.h

2010-06-11 Thread yuanbin
i have pushed the patch on mob Coo: initial last member of union Please change my name of patch: U-YUAN\Administrator - yuanbin 2010/6/11 grischka gris...@gmx.de: Too all: Please push patches on our mob branch:  http://repo.or.cz/w/tinycc.git People who don't like/know git: at least base

Please support coo.h

2010-06-10 Thread yuanbin
Coo - C, Object Oriented http://sourceforge.net/projects/coo/ -coo.h-- #ifndef __COO_H__ #define __COO_H__ typedef struct VTable /*root of virtual table class*/ { long offset; /*servers for FREE*/ } VTable; #define EXTENDS(s) \ union \ { \ s s; \

Re: Please support coo.h

2010-06-10 Thread yuanbin
-- initialization of the union: union { int i; float f; } t={1.5}; //t.f because of EXTENDS2 in coo.h, compiler needs to initialze last member of union. #include coo.h typedef struct VBase {} VBase; typedef struct CBase { VT(VBase) int i; } CBase; typedef

Re: Please support coo.h

2010-06-10 Thread yuanbin
initialization of global variable? 2010/6/10 Andreas Schwab sch...@redhat.com: yuanbin yuanb...@gmail.com writes: but i want default format: CThis t={0, 1, 1}; //simple Define a suitable constructor. Andreas. -- Andreas Schwab, sch...@redhat.com GPG Key fingerprint = D4E8 DBE3 3813

Re: Please support coo.h

2010-06-10 Thread yuanbin
This compiler's extension is valuable 2010/6/10 Wojciech Meyer wojciech.me...@googlemail.com: On Thu, Jun 10, 2010 at 2:10 PM, yuanbin yuanb...@gmail.com wrote: initialization of global variable? No, just define a macro. 2010/6/10 Andreas Schwab sch...@redhat.com: yuanbin yuanb

Re: Please support coo.h

2010-06-10 Thread yuanbin
, need not (CBase*)t ---not safe 2010/6/11 Dave Korn dave.korn.cyg...@gmail.com: On 10/06/2010 18:07, yuanbin wrote: This compiler's extension is valuable  No, it isn't very valuable, sorry to be blunt.  I think you are following a really wrong path here.  You are trying to implement a C