From 36718c3057b9b483804bce81851a025b59267060 Mon Sep 17 00:00:00 2001 From: Jerome St-Louis Date: Sun, 6 Jul 2014 09:47:07 -0400 Subject: [PATCH] compiler/libec: Only using gcc_struct attribute for MinGW --- compiler/bootstrap/ecc/bootstrap/ecc.c | 76 +++--- compiler/bootstrap/ecc/bootstrap/ecc.main.c | 39 +-- compiler/bootstrap/ecere/bootstrap/AVLTree.c | 43 ++-- compiler/bootstrap/ecere/bootstrap/Array.c | 43 ++-- compiler/bootstrap/ecere/bootstrap/BTNode.c | 43 ++-- compiler/bootstrap/ecere/bootstrap/BinaryTree.c | 43 ++-- compiler/bootstrap/ecere/bootstrap/BufferedFile.c | 43 ++-- .../bootstrap/ecere/bootstrap/BuiltInContainer.c | 41 +-- compiler/bootstrap/ecere/bootstrap/Container.c | 41 +-- compiler/bootstrap/ecere/bootstrap/CustomAVLTree.c | 43 ++-- compiler/bootstrap/ecere/bootstrap/DualPipe.c | 41 +-- compiler/bootstrap/ecere/bootstrap/File.c | 45 ++-- compiler/bootstrap/ecere/bootstrap/LinkList.c | 49 ++-- compiler/bootstrap/ecere/bootstrap/List.c | 55 +++-- compiler/bootstrap/ecere/bootstrap/Map.c | 49 ++-- compiler/bootstrap/ecere/bootstrap/OldList.c | 49 ++-- compiler/bootstrap/ecere/bootstrap/String.c | 39 +-- compiler/bootstrap/ecere/bootstrap/System.c | 47 ++-- compiler/bootstrap/ecere/bootstrap/TempFile.c | 41 +-- compiler/bootstrap/ecere/bootstrap/dataTypes.c | 47 ++-- compiler/bootstrap/ecere/bootstrap/ecere.main.c | 39 +-- compiler/bootstrap/ecere/bootstrap/i18n.c | 45 ++-- compiler/bootstrap/ecere/bootstrap/instance.c | 77 +++--- compiler/bootstrap/ecere/bootstrap/memory.c | 39 +-- compiler/bootstrap/ecp/bootstrap/ecp.c | 213 ++++++++-------- compiler/bootstrap/ecp/bootstrap/ecp.main.c | 39 +-- compiler/bootstrap/ecs/bootstrap/ecs.c | 99 ++++---- compiler/bootstrap/ecs/bootstrap/ecs.main.c | 39 +-- compiler/bootstrap/libec/bootstrap/ast.c | 265 ++++++++++---------- compiler/bootstrap/libec/bootstrap/copy.c | 199 +++++++-------- compiler/bootstrap/libec/bootstrap/dbpass.c | 203 +++++++-------- compiler/bootstrap/libec/bootstrap/ec.main.c | 39 +-- compiler/bootstrap/libec/bootstrap/ecdefs.c | 275 +++++++++++---------- compiler/bootstrap/libec/bootstrap/expression.c | 173 ++++++------- compiler/bootstrap/libec/bootstrap/firstPass.c | 181 +++++++------- compiler/bootstrap/libec/bootstrap/freeAst.c | 267 ++++++++++---------- compiler/bootstrap/libec/bootstrap/grammar.c | 203 +++++++-------- compiler/bootstrap/libec/bootstrap/lexer.c | 49 ++-- compiler/bootstrap/libec/bootstrap/loadSymbols.c | 119 ++++----- compiler/bootstrap/libec/bootstrap/output.c | 223 ++++++++--------- compiler/bootstrap/libec/bootstrap/pass0.c | 209 ++++++++-------- compiler/bootstrap/libec/bootstrap/pass1.c | 227 ++++++++--------- compiler/bootstrap/libec/bootstrap/pass15.c | 267 ++++++++++---------- compiler/bootstrap/libec/bootstrap/pass16.c | 219 ++++++++-------- compiler/bootstrap/libec/bootstrap/pass2.c | 219 ++++++++-------- compiler/bootstrap/libec/bootstrap/pass3.c | 207 ++++++++-------- compiler/bootstrap/libec/bootstrap/shortcuts.c | 59 ++--- compiler/bootstrap/libec/bootstrap/type.c | 181 +++++++------- compiler/ecc/ecc.ec | 3 + compiler/libec/src/output.ec | 4 +- 50 files changed, 2724 insertions(+), 2574 deletions(-) diff --git a/compiler/bootstrap/ecc/bootstrap/ecc.c b/compiler/bootstrap/ecc/bootstrap/ecc.c index 8715a40..dc3ea2d 100644 --- a/compiler/bootstrap/ecc/bootstrap/ecc.c +++ b/compiler/bootstrap/ecc/bootstrap/ecc.c @@ -38,11 +38,14 @@ typedef unsigned __int64 uint64; #if defined(_WIN32) # if defined(__GNUC__) || defined(__TINYC__) # define ecere_stdcall __attribute__((__stdcall__)) +# define ecere_gcc_struct __attribute__((gcc_struct)) # else # define ecere_stdcall __stdcall +# define ecere_gcc_struct # endif #else # define ecere_stdcall +# define ecere_gcc_struct #endif #include #include @@ -57,7 +60,7 @@ void * last; int count; unsigned int offset; unsigned int circ; -} __attribute__ ((gcc_struct)); +} ecere_gcc_struct; struct Type; @@ -76,8 +79,8 @@ float f; double d; long long i64; uint64 ui64; -} __attribute__ ((gcc_struct)) __anon1; -} __attribute__ ((gcc_struct)); +} ecere_gcc_struct __anon1; +} ecere_gcc_struct; struct __ecereNameSpace__ecere__com__SerialBuffer { @@ -85,7 +88,7 @@ unsigned char * _buffer; unsigned int count; unsigned int _size; unsigned int pos; -} __attribute__ ((gcc_struct)); +} ecere_gcc_struct; extern void * __ecereNameSpace__ecere__com__eSystem_New(unsigned int size); @@ -105,7 +108,7 @@ int line; int charPos; int pos; int included; -} __attribute__ ((gcc_struct)); +} ecere_gcc_struct; struct Expression; @@ -245,7 +248,7 @@ struct Location { struct CodePosition start; struct CodePosition end; -} __attribute__ ((gcc_struct)); +} ecere_gcc_struct; extern void FreeModuleDefine(struct Definition * def); @@ -262,7 +265,7 @@ struct __ecereNameSpace__ecere__sys__OldList classes; struct __ecereNameSpace__ecere__sys__OldList functions; int importType; int importAccess; -} __attribute__ ((gcc_struct)); +} ecere_gcc_struct; extern void SetMainModule(struct ModuleImport * moduleImport); @@ -277,7 +280,7 @@ struct __ecereNameSpace__ecere__sys__BTNode * parent; struct __ecereNameSpace__ecere__sys__BTNode * left; struct __ecereNameSpace__ecere__sys__BTNode * right; int depth; -} __attribute__ ((gcc_struct)); +} ecere_gcc_struct; struct __ecereNameSpace__ecere__com__Class; @@ -286,7 +289,7 @@ struct __ecereNameSpace__ecere__com__Instance void * * _vTbl; struct __ecereNameSpace__ecere__com__Class * _class; int _refCount; -} __attribute__ ((gcc_struct)); +} ecere_gcc_struct; extern long long __ecereNameSpace__ecere__com__eClass_GetProperty(struct __ecereNameSpace__ecere__com__Class * _class, const char * name); @@ -346,7 +349,7 @@ const char * category; unsigned int compiled; unsigned int selfWatchable; unsigned int isWatchable; -} __attribute__ ((gcc_struct)); +} ecere_gcc_struct; extern void __ecereNameSpace__ecere__com__eInstance_FireSelfWatchers(struct __ecereNameSpace__ecere__com__Instance * instance, struct __ecereNameSpace__ecere__com__Property * _property); @@ -363,7 +366,7 @@ struct FunctionImport struct FunctionImport * prev; struct FunctionImport * next; char * name; -} __attribute__ ((gcc_struct)); +} ecere_gcc_struct; struct MethodImport; @@ -373,7 +376,7 @@ struct MethodImport * prev; struct MethodImport * next; char * name; unsigned int isVirtual; -} __attribute__ ((gcc_struct)); +} ecere_gcc_struct; struct PropertyImport; @@ -385,7 +388,7 @@ char * name; unsigned int isVirtual; unsigned int hasSet; unsigned int hasGet; -} __attribute__ ((gcc_struct)); +} ecere_gcc_struct; struct __ecereNameSpace__ecere__com__NameSpace; @@ -413,7 +416,7 @@ int importType; unsigned int globalInstance; unsigned int dllOnly; int importAccess; -} __attribute__ ((gcc_struct)); +} ecere_gcc_struct; struct ClassImport; @@ -426,7 +429,7 @@ struct __ecereNameSpace__ecere__sys__OldList methods; struct __ecereNameSpace__ecere__sys__OldList properties; unsigned int itself; int isRemote; -} __attribute__ ((gcc_struct)); +} ecere_gcc_struct; static void OutputImports(char * fileName) { @@ -527,7 +530,7 @@ struct __ecereNameSpace__ecere__sys__BTNode * root; int count; int (* CompareKey)(struct __ecereNameSpace__ecere__sys__BinaryTree * tree, uintptr_t a, uintptr_t b); void (* FreeKey)(void * key); -} __attribute__ ((gcc_struct)); +} ecere_gcc_struct; struct __ecereNameSpace__ecere__com__NameSpace { @@ -541,7 +544,7 @@ struct __ecereNameSpace__ecere__sys__BinaryTree nameSpaces; struct __ecereNameSpace__ecere__sys__BinaryTree classes; struct __ecereNameSpace__ecere__sys__BinaryTree defines; struct __ecereNameSpace__ecere__sys__BinaryTree functions; -} __attribute__ ((gcc_struct)); +} ecere_gcc_struct; struct Context { @@ -556,7 +559,7 @@ struct __ecereNameSpace__ecere__sys__BinaryTree templateTypes; struct ClassDefinition * classDef; unsigned int templateTypesOnly; unsigned int hasNameSpace; -} __attribute__ ((gcc_struct)); +} ecere_gcc_struct; unsigned int __ecereMethod___ecereNameSpace__ecere__sys__BinaryTree_Add(struct __ecereNameSpace__ecere__sys__BinaryTree * this, struct __ecereNameSpace__ecere__sys__BTNode * node); @@ -571,7 +574,7 @@ unsigned int isGUIApp; struct __ecereNameSpace__ecere__sys__OldList allModules; char * parsedCommand; struct __ecereNameSpace__ecere__com__NameSpace systemNameSpace; -} __attribute__ ((gcc_struct)); +} ecere_gcc_struct; static struct __ecereNameSpace__ecere__com__NameSpace globalData; @@ -596,7 +599,7 @@ void * symbol; const char * dataTypeString; struct Type * dataType; int memberAccess; -} __attribute__ ((gcc_struct)); +} ecere_gcc_struct; extern struct __ecereNameSpace__ecere__com__Method * __ecereNameSpace__ecere__com__eClass_AddMethod(struct __ecereNameSpace__ecere__com__Class * _class, const char * name, const char * type, void * function, int declMode); @@ -618,7 +621,7 @@ int importType; int origImportType; struct __ecereNameSpace__ecere__com__NameSpace privateNameSpace; struct __ecereNameSpace__ecere__com__NameSpace publicNameSpace; -} __attribute__ ((gcc_struct)); +} ecere_gcc_struct; static struct __ecereNameSpace__ecere__com__Instance * privateModule; @@ -637,7 +640,7 @@ struct Type * dataType; void * symbol; char * fullName; char __ecere_padding[40]; -} __attribute__ ((gcc_struct)); +} ecere_gcc_struct; extern struct __ecereNameSpace__ecere__com__Instance * __ecereNameSpace__ecere__com__eModule_LoadStrict(struct __ecereNameSpace__ecere__com__Instance * fromModule, const char * name, int importAccess); @@ -664,7 +667,7 @@ struct { const char * dataTypeString; struct __ecereNameSpace__ecere__com__Class * dataTypeClass; -} __attribute__ ((gcc_struct)) __anon1; +} ecere_gcc_struct __anon1; struct __ecereNameSpace__ecere__com__DataValue expression; struct { @@ -674,10 +677,10 @@ union struct __ecereNameSpace__ecere__com__DataMember * member; struct __ecereNameSpace__ecere__com__Property * prop; struct __ecereNameSpace__ecere__com__Method * method; -} __attribute__ ((gcc_struct)) __anon1; -} __attribute__ ((gcc_struct)) __anon2; -} __attribute__ ((gcc_struct)) __anon1; -} __attribute__ ((gcc_struct)); +} ecere_gcc_struct __anon1; +} ecere_gcc_struct __anon2; +} ecere_gcc_struct __anon1; +} ecere_gcc_struct; struct __ecereNameSpace__ecere__com__DataMember { @@ -699,7 +702,7 @@ struct __ecereNameSpace__ecere__sys__BinaryTree membersAlpha; int memberOffset; short structAlignment; short pointerAlignment; -} __attribute__ ((gcc_struct)); +} ecere_gcc_struct; struct __ecereNameSpace__ecere__com__Class { @@ -758,7 +761,7 @@ struct __ecereNameSpace__ecere__sys__OldList templatized; int numParams; unsigned int isInstanceClass; unsigned int byValueSystemClass; -} __attribute__ ((gcc_struct)); +} ecere_gcc_struct; static struct __ecereNameSpace__ecere__com__Class * __ecereClass_CompilerApp; @@ -806,7 +809,7 @@ union struct __ecereNameSpace__ecere__com__Method * method; struct __ecereNameSpace__ecere__com__Property * _property; struct __ecereNameSpace__ecere__com__Class * registered; -} __attribute__ ((gcc_struct)) __anon1; +} ecere_gcc_struct __anon1; unsigned int notYetDeclared; union { @@ -814,20 +817,20 @@ struct { struct External * pointerExternal; struct External * structExternal; -} __attribute__ ((gcc_struct)) __anon1; +} ecere_gcc_struct __anon1; struct { struct External * externalGet; struct External * externalSet; struct External * externalPtr; struct External * externalIsSet; -} __attribute__ ((gcc_struct)) __anon2; +} ecere_gcc_struct __anon2; struct { struct External * methodExternal; struct External * methodCodeExternal; -} __attribute__ ((gcc_struct)) __anon3; -} __attribute__ ((gcc_struct)) __anon2; +} ecere_gcc_struct __anon3; +} ecere_gcc_struct __anon2; unsigned int imported; unsigned int declaredStructSym; struct __ecereNameSpace__ecere__com__Class * _class; @@ -855,7 +858,7 @@ struct Context * ctx; int isIterator; struct Expression * propCategory; unsigned int mustRegister; -} __attribute__ ((gcc_struct)); +} ecere_gcc_struct; struct __ecereNameSpace__ecere__sys__OldList _excludedSymbols = { @@ -1260,11 +1263,14 @@ __ecereMethod___ecereNameSpace__ecere__sys__File_Printf(output, "#endif\n"); __ecereMethod___ecereNameSpace__ecere__sys__File_Printf(output, "#if defined(_WIN32)\n"); __ecereMethod___ecereNameSpace__ecere__sys__File_Printf(output, "# if defined(__GNUC__) || defined(__TINYC__)\n"); __ecereMethod___ecereNameSpace__ecere__sys__File_Printf(output, "# define ecere_stdcall __attribute__((__stdcall__))\n"); +__ecereMethod___ecereNameSpace__ecere__sys__File_Printf(output, "# define ecere_gcc_struct __attribute__((gcc_struct))\n"); __ecereMethod___ecereNameSpace__ecere__sys__File_Printf(output, "# else\n"); __ecereMethod___ecereNameSpace__ecere__sys__File_Printf(output, "# define ecere_stdcall __stdcall\n"); +__ecereMethod___ecereNameSpace__ecere__sys__File_Printf(output, "# define ecere_gcc_struct\n"); __ecereMethod___ecereNameSpace__ecere__sys__File_Printf(output, "# endif\n"); __ecereMethod___ecereNameSpace__ecere__sys__File_Printf(output, "#else\n"); __ecereMethod___ecereNameSpace__ecere__sys__File_Printf(output, "# define ecere_stdcall\n"); +__ecereMethod___ecereNameSpace__ecere__sys__File_Printf(output, "# define ecere_gcc_struct\n"); __ecereMethod___ecereNameSpace__ecere__sys__File_Printf(output, "#endif\n"); if(buildingBootStrap) { diff --git a/compiler/bootstrap/ecc/bootstrap/ecc.main.c b/compiler/bootstrap/ecc/bootstrap/ecc.main.c index 575a7b4..ffa9456 100644 --- a/compiler/bootstrap/ecc/bootstrap/ecc.main.c +++ b/compiler/bootstrap/ecc/bootstrap/ecc.main.c @@ -38,11 +38,14 @@ typedef unsigned __int64 uint64; #if defined(_WIN32) # if defined(__GNUC__) || defined(__TINYC__) # define ecere_stdcall __attribute__((__stdcall__)) +# define ecere_gcc_struct __attribute__((gcc_struct)) # else # define ecere_stdcall __stdcall +# define ecere_gcc_struct # endif #else # define ecere_stdcall +# define ecere_gcc_struct #endif #include #include @@ -65,7 +68,7 @@ void * last; int count; unsigned int offset; unsigned int circ; -} __attribute__ ((gcc_struct)); +} ecere_gcc_struct; struct __ecereNameSpace__ecere__sys__BTNode; @@ -86,8 +89,8 @@ float f; double d; long long i64; uint64 ui64; -} __attribute__ ((gcc_struct)) __anon1; -} __attribute__ ((gcc_struct)); +} ecere_gcc_struct __anon1; +} ecere_gcc_struct; struct __ecereNameSpace__ecere__com__SerialBuffer { @@ -95,7 +98,7 @@ unsigned char * _buffer; unsigned int count; unsigned int _size; unsigned int pos; -} __attribute__ ((gcc_struct)); +} ecere_gcc_struct; extern void * __ecereNameSpace__ecere__com__eSystem_New(unsigned int size); @@ -118,7 +121,7 @@ struct __ecereNameSpace__ecere__com__Instance void * * _vTbl; struct __ecereNameSpace__ecere__com__Class * _class; int _refCount; -} __attribute__ ((gcc_struct)); +} ecere_gcc_struct; extern long long __ecereNameSpace__ecere__com__eClass_GetProperty(struct __ecereNameSpace__ecere__com__Class * _class, const char * name); @@ -176,7 +179,7 @@ const char * category; unsigned int compiled; unsigned int selfWatchable; unsigned int isWatchable; -} __attribute__ ((gcc_struct)); +} ecere_gcc_struct; extern void __ecereNameSpace__ecere__com__eInstance_FireSelfWatchers(struct __ecereNameSpace__ecere__com__Instance * instance, struct __ecereNameSpace__ecere__com__Property * _property); @@ -196,7 +199,7 @@ struct __ecereNameSpace__ecere__sys__BTNode * root; int count; int (* CompareKey)(struct __ecereNameSpace__ecere__sys__BinaryTree * tree, uintptr_t a, uintptr_t b); void (* FreeKey)(void * key); -} __attribute__ ((gcc_struct)); +} ecere_gcc_struct; struct __ecereNameSpace__ecere__com__Method; @@ -215,7 +218,7 @@ void * symbol; const char * dataTypeString; struct Type * dataType; int memberAccess; -} __attribute__ ((gcc_struct)); +} ecere_gcc_struct; struct __ecereNameSpace__ecere__com__Module; @@ -261,7 +264,7 @@ struct __ecereNameSpace__ecere__sys__BinaryTree nameSpaces; struct __ecereNameSpace__ecere__sys__BinaryTree classes; struct __ecereNameSpace__ecere__sys__BinaryTree defines; struct __ecereNameSpace__ecere__sys__BinaryTree functions; -} __attribute__ ((gcc_struct)); +} ecere_gcc_struct; struct __ecereNameSpace__ecere__com__Application { @@ -272,7 +275,7 @@ unsigned int isGUIApp; struct __ecereNameSpace__ecere__sys__OldList allModules; char * parsedCommand; struct __ecereNameSpace__ecere__com__NameSpace systemNameSpace; -} __attribute__ ((gcc_struct)); +} ecere_gcc_struct; struct __ecereNameSpace__ecere__com__Module { @@ -290,7 +293,7 @@ int importType; int origImportType; struct __ecereNameSpace__ecere__com__NameSpace privateNameSpace; struct __ecereNameSpace__ecere__com__NameSpace publicNameSpace; -} __attribute__ ((gcc_struct)); +} ecere_gcc_struct; void __ecereRegisterModule_ecc_main(struct __ecereNameSpace__ecere__com__Instance * module) { @@ -313,7 +316,7 @@ struct { const char * dataTypeString; struct __ecereNameSpace__ecere__com__Class * dataTypeClass; -} __attribute__ ((gcc_struct)) __anon1; +} ecere_gcc_struct __anon1; struct __ecereNameSpace__ecere__com__DataValue expression; struct { @@ -323,10 +326,10 @@ union struct __ecereNameSpace__ecere__com__DataMember * member; struct __ecereNameSpace__ecere__com__Property * prop; struct __ecereNameSpace__ecere__com__Method * method; -} __attribute__ ((gcc_struct)) __anon1; -} __attribute__ ((gcc_struct)) __anon2; -} __attribute__ ((gcc_struct)) __anon1; -} __attribute__ ((gcc_struct)); +} ecere_gcc_struct __anon1; +} ecere_gcc_struct __anon2; +} ecere_gcc_struct __anon1; +} ecere_gcc_struct; struct __ecereNameSpace__ecere__com__DataMember { @@ -348,7 +351,7 @@ struct __ecereNameSpace__ecere__sys__BinaryTree membersAlpha; int memberOffset; short structAlignment; short pointerAlignment; -} __attribute__ ((gcc_struct)); +} ecere_gcc_struct; struct __ecereNameSpace__ecere__com__Class { @@ -407,7 +410,7 @@ struct __ecereNameSpace__ecere__sys__OldList templatized; int numParams; unsigned int isInstanceClass; unsigned int byValueSystemClass; -} __attribute__ ((gcc_struct)); +} ecere_gcc_struct; extern struct __ecereNameSpace__ecere__com__Class * __ecereClass___ecereNameSpace__ecere__com__Instance; diff --git a/compiler/bootstrap/ecere/bootstrap/AVLTree.c b/compiler/bootstrap/ecere/bootstrap/AVLTree.c index 8693f42..50239aa 100644 --- a/compiler/bootstrap/ecere/bootstrap/AVLTree.c +++ b/compiler/bootstrap/ecere/bootstrap/AVLTree.c @@ -38,11 +38,14 @@ typedef unsigned __int64 uint64; #if defined(_WIN32) # if defined(__GNUC__) || defined(__TINYC__) # define ecere_stdcall __attribute__((__stdcall__)) +# define ecere_gcc_struct __attribute__((gcc_struct)) # else # define ecere_stdcall __stdcall +# define ecere_gcc_struct # endif #else # define ecere_stdcall +# define ecere_gcc_struct #endif #include #include @@ -55,7 +58,7 @@ void * last; int count; unsigned int offset; unsigned int circ; -} __attribute__ ((gcc_struct)); +} ecere_gcc_struct; struct __ecereNameSpace__ecere__com__DataValue { @@ -72,8 +75,8 @@ float f; double d; long long i64; uint64 ui64; -} __attribute__ ((gcc_struct)) __anon1; -} __attribute__ ((gcc_struct)); +} ecere_gcc_struct __anon1; +} ecere_gcc_struct; struct __ecereNameSpace__ecere__com__SerialBuffer { @@ -81,7 +84,7 @@ unsigned char * _buffer; unsigned int count; unsigned int _size; unsigned int pos; -} __attribute__ ((gcc_struct)); +} ecere_gcc_struct; extern void * __ecereNameSpace__ecere__com__eSystem_New(unsigned int size); @@ -99,7 +102,7 @@ struct __ecereNameSpace__ecere__com__CustomAVLTree { struct __ecereNameSpace__ecere__com__AVLNode * root; int count; -} __attribute__ ((gcc_struct)); +} ecere_gcc_struct; struct __ecereNameSpace__ecere__com__ClassTemplateParameter; @@ -112,7 +115,7 @@ struct __ecereNameSpace__ecere__com__Instance void * * _vTbl; struct __ecereNameSpace__ecere__com__Class * _class; int _refCount; -} __attribute__ ((gcc_struct)); +} ecere_gcc_struct; extern long long __ecereNameSpace__ecere__com__eClass_GetProperty(struct __ecereNameSpace__ecere__com__Class * _class, const char * name); @@ -156,7 +159,7 @@ const char * category; unsigned int compiled; unsigned int selfWatchable; unsigned int isWatchable; -} __attribute__ ((gcc_struct)); +} ecere_gcc_struct; extern void __ecereNameSpace__ecere__com__eInstance_FireSelfWatchers(struct __ecereNameSpace__ecere__com__Instance * instance, struct __ecereNameSpace__ecere__com__Property * _property); @@ -175,7 +178,7 @@ struct __ecereNameSpace__ecere__com__AVLNode * left; struct __ecereNameSpace__ecere__com__AVLNode * right; int depth; uint64 key; -} __attribute__ ((gcc_struct)); +} ecere_gcc_struct; struct __ecereNameSpace__ecere__com__AVLNode * __ecereMethod___ecereNameSpace__ecere__com__AVLNode_Find(struct __ecereNameSpace__ecere__com__AVLNode * this, struct __ecereNameSpace__ecere__com__Class * Tclass, const uint64 key); @@ -189,7 +192,7 @@ struct __ecereNameSpace__ecere__sys__BTNode * root; int count; int (* CompareKey)(struct __ecereNameSpace__ecere__sys__BinaryTree * tree, uintptr_t a, uintptr_t b); void (* FreeKey)(void * key); -} __attribute__ ((gcc_struct)); +} ecere_gcc_struct; struct __ecereNameSpace__ecere__com__Method; @@ -208,7 +211,7 @@ void * symbol; const char * dataTypeString; struct __ecereNameSpace__ecere__com__Instance * dataType; int memberAccess; -} __attribute__ ((gcc_struct)); +} ecere_gcc_struct; extern struct __ecereNameSpace__ecere__com__Method * __ecereNameSpace__ecere__com__eClass_AddMethod(struct __ecereNameSpace__ecere__com__Class * _class, const char * name, const char * type, void * function, int declMode); @@ -232,7 +235,7 @@ struct __ecereNameSpace__ecere__sys__BinaryTree nameSpaces; struct __ecereNameSpace__ecere__sys__BinaryTree classes; struct __ecereNameSpace__ecere__sys__BinaryTree defines; struct __ecereNameSpace__ecere__sys__BinaryTree functions; -} __attribute__ ((gcc_struct)); +} ecere_gcc_struct; struct __ecereNameSpace__ecere__com__Application { @@ -243,7 +246,7 @@ unsigned int isGUIApp; struct __ecereNameSpace__ecere__sys__OldList allModules; char * parsedCommand; struct __ecereNameSpace__ecere__com__NameSpace systemNameSpace; -} __attribute__ ((gcc_struct)); +} ecere_gcc_struct; struct __ecereNameSpace__ecere__com__Module { @@ -261,7 +264,7 @@ int importType; int origImportType; struct __ecereNameSpace__ecere__com__NameSpace privateNameSpace; struct __ecereNameSpace__ecere__com__NameSpace publicNameSpace; -} __attribute__ ((gcc_struct)); +} ecere_gcc_struct; void __ecereUnregisterModule_AVLTree(struct __ecereNameSpace__ecere__com__Instance * module) { @@ -278,7 +281,7 @@ struct { const char * dataTypeString; struct __ecereNameSpace__ecere__com__Class * dataTypeClass; -} __attribute__ ((gcc_struct)) __anon1; +} ecere_gcc_struct __anon1; struct __ecereNameSpace__ecere__com__DataValue expression; struct { @@ -288,10 +291,10 @@ union struct __ecereNameSpace__ecere__com__DataMember * member; struct __ecereNameSpace__ecere__com__Property * prop; struct __ecereNameSpace__ecere__com__Method * method; -} __attribute__ ((gcc_struct)) __anon1; -} __attribute__ ((gcc_struct)) __anon2; -} __attribute__ ((gcc_struct)) __anon1; -} __attribute__ ((gcc_struct)); +} ecere_gcc_struct __anon1; +} ecere_gcc_struct __anon2; +} ecere_gcc_struct __anon1; +} ecere_gcc_struct; struct __ecereNameSpace__ecere__com__DataMember { @@ -313,7 +316,7 @@ struct __ecereNameSpace__ecere__sys__BinaryTree membersAlpha; int memberOffset; short structAlignment; short pointerAlignment; -} __attribute__ ((gcc_struct)); +} ecere_gcc_struct; struct __ecereNameSpace__ecere__com__Class { @@ -372,7 +375,7 @@ struct __ecereNameSpace__ecere__sys__OldList templatized; int numParams; unsigned int isInstanceClass; unsigned int byValueSystemClass; -} __attribute__ ((gcc_struct)); +} ecere_gcc_struct; extern struct __ecereNameSpace__ecere__com__ClassTemplateParameter * __ecereNameSpace__ecere__com__eClass_AddTemplateParameter(struct __ecereNameSpace__ecere__com__Class * _class, const char * name, int type, const void * info, struct __ecereNameSpace__ecere__com__ClassTemplateArgument * defaultArg); diff --git a/compiler/bootstrap/ecere/bootstrap/Array.c b/compiler/bootstrap/ecere/bootstrap/Array.c index c39c5c8..aa8a55d 100644 --- a/compiler/bootstrap/ecere/bootstrap/Array.c +++ b/compiler/bootstrap/ecere/bootstrap/Array.c @@ -38,11 +38,14 @@ typedef unsigned __int64 uint64; #if defined(_WIN32) # if defined(__GNUC__) || defined(__TINYC__) # define ecere_stdcall __attribute__((__stdcall__)) +# define ecere_gcc_struct __attribute__((gcc_struct)) # else # define ecere_stdcall __stdcall +# define ecere_gcc_struct # endif #else # define ecere_stdcall +# define ecere_gcc_struct #endif #include #include @@ -51,7 +54,7 @@ struct __ecereNameSpace__ecere__com__Array uint64 * array; unsigned int count; unsigned int minAllocSize; -} __attribute__ ((gcc_struct)); +} ecere_gcc_struct; struct __ecereNameSpace__ecere__sys__BTNode; @@ -62,7 +65,7 @@ void * last; int count; unsigned int offset; unsigned int circ; -} __attribute__ ((gcc_struct)); +} ecere_gcc_struct; struct __ecereNameSpace__ecere__com__DataValue { @@ -79,8 +82,8 @@ float f; double d; long long i64; uint64 ui64; -} __attribute__ ((gcc_struct)) __anon1; -} __attribute__ ((gcc_struct)); +} ecere_gcc_struct __anon1; +} ecere_gcc_struct; struct __ecereNameSpace__ecere__com__SerialBuffer { @@ -88,7 +91,7 @@ unsigned char * _buffer; unsigned int count; unsigned int _size; unsigned int pos; -} __attribute__ ((gcc_struct)); +} ecere_gcc_struct; extern void * __ecereNameSpace__ecere__com__eSystem_New(unsigned int size); @@ -125,7 +128,7 @@ struct __ecereNameSpace__ecere__com__Instance void * * _vTbl; struct __ecereNameSpace__ecere__com__Class * _class; int _refCount; -} __attribute__ ((gcc_struct)); +} ecere_gcc_struct; extern long long __ecereNameSpace__ecere__com__eClass_GetProperty(struct __ecereNameSpace__ecere__com__Class * _class, const char * name); @@ -139,7 +142,7 @@ int _refCount; void * data; int count; struct __ecereNameSpace__ecere__com__Class * type; -} __attribute__ ((gcc_struct)); +} ecere_gcc_struct; extern unsigned int __ecereNameSpace__ecere__com__eClass_IsDerived(struct __ecereNameSpace__ecere__com__Class * _class, struct __ecereNameSpace__ecere__com__Class * from); @@ -169,7 +172,7 @@ const char * category; unsigned int compiled; unsigned int selfWatchable; unsigned int isWatchable; -} __attribute__ ((gcc_struct)); +} ecere_gcc_struct; extern void __ecereNameSpace__ecere__com__eInstance_FireSelfWatchers(struct __ecereNameSpace__ecere__com__Instance * instance, struct __ecereNameSpace__ecere__com__Property * _property); @@ -207,7 +210,7 @@ struct __ecereNameSpace__ecere__sys__BTNode * root; int count; int (* CompareKey)(struct __ecereNameSpace__ecere__sys__BinaryTree * tree, uintptr_t a, uintptr_t b); void (* FreeKey)(void * key); -} __attribute__ ((gcc_struct)); +} ecere_gcc_struct; struct __ecereNameSpace__ecere__com__DataMember; @@ -231,7 +234,7 @@ struct __ecereNameSpace__ecere__sys__BinaryTree membersAlpha; int memberOffset; short structAlignment; short pointerAlignment; -} __attribute__ ((gcc_struct)); +} ecere_gcc_struct; extern struct __ecereNameSpace__ecere__com__DataMember * __ecereNameSpace__ecere__com__eClass_AddDataMember(struct __ecereNameSpace__ecere__com__Class * _class, const char * name, const char * type, unsigned int size, unsigned int alignment, int declMode); @@ -245,7 +248,7 @@ struct { const char * dataTypeString; struct __ecereNameSpace__ecere__com__Class * dataTypeClass; -} __attribute__ ((gcc_struct)) __anon1; +} ecere_gcc_struct __anon1; struct __ecereNameSpace__ecere__com__DataValue expression; struct { @@ -255,10 +258,10 @@ union struct __ecereNameSpace__ecere__com__DataMember * member; struct __ecereNameSpace__ecere__com__Property * prop; struct __ecereNameSpace__ecere__com__Method * method; -} __attribute__ ((gcc_struct)) __anon1; -} __attribute__ ((gcc_struct)) __anon2; -} __attribute__ ((gcc_struct)) __anon1; -} __attribute__ ((gcc_struct)); +} ecere_gcc_struct __anon1; +} ecere_gcc_struct __anon2; +} ecere_gcc_struct __anon1; +} ecere_gcc_struct; struct __ecereNameSpace__ecere__com__Method { @@ -275,7 +278,7 @@ void * symbol; const char * dataTypeString; struct __ecereNameSpace__ecere__com__Instance * dataType; int memberAccess; -} __attribute__ ((gcc_struct)); +} ecere_gcc_struct; extern struct __ecereNameSpace__ecere__com__Method * __ecereNameSpace__ecere__com__eClass_AddMethod(struct __ecereNameSpace__ecere__com__Class * _class, const char * name, const char * type, void * function, int declMode); @@ -299,7 +302,7 @@ struct __ecereNameSpace__ecere__sys__BinaryTree nameSpaces; struct __ecereNameSpace__ecere__sys__BinaryTree classes; struct __ecereNameSpace__ecere__sys__BinaryTree defines; struct __ecereNameSpace__ecere__sys__BinaryTree functions; -} __attribute__ ((gcc_struct)); +} ecere_gcc_struct; struct __ecereNameSpace__ecere__com__Class { @@ -358,7 +361,7 @@ struct __ecereNameSpace__ecere__sys__OldList templatized; int numParams; unsigned int isInstanceClass; unsigned int byValueSystemClass; -} __attribute__ ((gcc_struct)); +} ecere_gcc_struct; struct __ecereNameSpace__ecere__com__Application { @@ -369,7 +372,7 @@ unsigned int isGUIApp; struct __ecereNameSpace__ecere__sys__OldList allModules; char * parsedCommand; struct __ecereNameSpace__ecere__com__NameSpace systemNameSpace; -} __attribute__ ((gcc_struct)); +} ecere_gcc_struct; static struct __ecereNameSpace__ecere__com__Class * __ecereClass___ecereNameSpace__ecere__com__Array; @@ -397,7 +400,7 @@ int importType; int origImportType; struct __ecereNameSpace__ecere__com__NameSpace privateNameSpace; struct __ecereNameSpace__ecere__com__NameSpace publicNameSpace; -} __attribute__ ((gcc_struct)); +} ecere_gcc_struct; void __ecereDestructor___ecereNameSpace__ecere__com__Array(struct __ecereNameSpace__ecere__com__Instance * this) { diff --git a/compiler/bootstrap/ecere/bootstrap/BTNode.c b/compiler/bootstrap/ecere/bootstrap/BTNode.c index eede63a..3d81da1 100644 --- a/compiler/bootstrap/ecere/bootstrap/BTNode.c +++ b/compiler/bootstrap/ecere/bootstrap/BTNode.c @@ -38,11 +38,14 @@ typedef unsigned __int64 uint64; #if defined(_WIN32) # if defined(__GNUC__) || defined(__TINYC__) # define ecere_stdcall __attribute__((__stdcall__)) +# define ecere_gcc_struct __attribute__((gcc_struct)) # else # define ecere_stdcall __stdcall +# define ecere_gcc_struct # endif #else # define ecere_stdcall +# define ecere_gcc_struct #endif #include #include @@ -55,7 +58,7 @@ void * last; int count; unsigned int offset; unsigned int circ; -} __attribute__ ((gcc_struct)); +} ecere_gcc_struct; struct __ecereNameSpace__ecere__com__DataValue { @@ -72,8 +75,8 @@ float f; double d; long long i64; uint64 ui64; -} __attribute__ ((gcc_struct)) __anon1; -} __attribute__ ((gcc_struct)); +} ecere_gcc_struct __anon1; +} ecere_gcc_struct; struct __ecereNameSpace__ecere__com__SerialBuffer { @@ -81,7 +84,7 @@ unsigned char * _buffer; unsigned int count; unsigned int _size; unsigned int pos; -} __attribute__ ((gcc_struct)); +} ecere_gcc_struct; extern void * __ecereNameSpace__ecere__com__eSystem_New(unsigned int size); @@ -143,7 +146,7 @@ struct __ecereNameSpace__ecere__sys__BTNode uintptr_t key; struct __ecereNameSpace__ecere__sys__BTNode * parent, * left, * right; int depth; -} __attribute__ ((gcc_struct)); +} ecere_gcc_struct; struct __ecereNameSpace__ecere__sys__BTNode * __ecereProp___ecereNameSpace__ecere__sys__BTNode_Get_minimum(struct __ecereNameSpace__ecere__sys__BTNode * this) { @@ -539,7 +542,7 @@ struct __ecereNameSpace__ecere__com__Instance void * * _vTbl; struct __ecereNameSpace__ecere__com__Class * _class; int _refCount; -} __attribute__ ((gcc_struct)); +} ecere_gcc_struct; extern long long __ecereNameSpace__ecere__com__eClass_GetProperty(struct __ecereNameSpace__ecere__com__Class * _class, const char * name); @@ -575,7 +578,7 @@ const char * category; unsigned int compiled; unsigned int selfWatchable; unsigned int isWatchable; -} __attribute__ ((gcc_struct)); +} ecere_gcc_struct; extern void __ecereNameSpace__ecere__com__eInstance_FireSelfWatchers(struct __ecereNameSpace__ecere__com__Instance * instance, struct __ecereNameSpace__ecere__com__Property * _property); @@ -598,7 +601,7 @@ struct __ecereNameSpace__ecere__sys__StringBTNode char * key; struct __ecereNameSpace__ecere__sys__StringBTNode * parent, * left, * right; int depth; -} __attribute__ ((gcc_struct)); +} ecere_gcc_struct; struct __ecereNameSpace__ecere__sys__BinaryTree; @@ -608,7 +611,7 @@ struct __ecereNameSpace__ecere__sys__BTNode * root; int count; int (* CompareKey)(struct __ecereNameSpace__ecere__sys__BinaryTree * tree, uintptr_t a, uintptr_t b); void (* FreeKey)(void * key); -} __attribute__ ((gcc_struct)); +} ecere_gcc_struct; unsigned int __ecereMethod___ecereNameSpace__ecere__sys__BTNode_Add(struct __ecereNameSpace__ecere__sys__BTNode * this, struct __ecereNameSpace__ecere__sys__BinaryTree * tree, struct __ecereNameSpace__ecere__sys__BTNode * node) { @@ -816,7 +819,7 @@ struct __ecereNameSpace__ecere__sys__BinaryTree membersAlpha; int memberOffset; short structAlignment; short pointerAlignment; -} __attribute__ ((gcc_struct)); +} ecere_gcc_struct; extern struct __ecereNameSpace__ecere__com__DataMember * __ecereNameSpace__ecere__com__eClass_AddDataMember(struct __ecereNameSpace__ecere__com__Class * _class, const char * name, const char * type, unsigned int size, unsigned int alignment, int declMode); @@ -830,7 +833,7 @@ struct { const char * dataTypeString; struct __ecereNameSpace__ecere__com__Class * dataTypeClass; -} __attribute__ ((gcc_struct)) __anon1; +} ecere_gcc_struct __anon1; struct __ecereNameSpace__ecere__com__DataValue expression; struct { @@ -840,10 +843,10 @@ union struct __ecereNameSpace__ecere__com__DataMember * member; struct __ecereNameSpace__ecere__com__Property * prop; struct __ecereNameSpace__ecere__com__Method * method; -} __attribute__ ((gcc_struct)) __anon1; -} __attribute__ ((gcc_struct)) __anon2; -} __attribute__ ((gcc_struct)) __anon1; -} __attribute__ ((gcc_struct)); +} ecere_gcc_struct __anon1; +} ecere_gcc_struct __anon2; +} ecere_gcc_struct __anon1; +} ecere_gcc_struct; struct __ecereNameSpace__ecere__com__Method { @@ -860,7 +863,7 @@ void * symbol; const char * dataTypeString; struct __ecereNameSpace__ecere__com__Instance * dataType; int memberAccess; -} __attribute__ ((gcc_struct)); +} ecere_gcc_struct; extern struct __ecereNameSpace__ecere__com__Method * __ecereNameSpace__ecere__com__eClass_AddMethod(struct __ecereNameSpace__ecere__com__Class * _class, const char * name, const char * type, void * function, int declMode); @@ -886,7 +889,7 @@ struct __ecereNameSpace__ecere__sys__BinaryTree nameSpaces; struct __ecereNameSpace__ecere__sys__BinaryTree classes; struct __ecereNameSpace__ecere__sys__BinaryTree defines; struct __ecereNameSpace__ecere__sys__BinaryTree functions; -} __attribute__ ((gcc_struct)); +} ecere_gcc_struct; struct __ecereNameSpace__ecere__com__Class { @@ -945,7 +948,7 @@ struct __ecereNameSpace__ecere__sys__OldList templatized; int numParams; unsigned int isInstanceClass; unsigned int byValueSystemClass; -} __attribute__ ((gcc_struct)); +} ecere_gcc_struct; struct __ecereNameSpace__ecere__com__Application { @@ -956,7 +959,7 @@ unsigned int isGUIApp; struct __ecereNameSpace__ecere__sys__OldList allModules; char * parsedCommand; struct __ecereNameSpace__ecere__com__NameSpace systemNameSpace; -} __attribute__ ((gcc_struct)); +} ecere_gcc_struct; static struct __ecereNameSpace__ecere__com__Class * __ecereClass___ecereNameSpace__ecere__sys__TreePrintStyle; @@ -988,7 +991,7 @@ int importType; int origImportType; struct __ecereNameSpace__ecere__com__NameSpace privateNameSpace; struct __ecereNameSpace__ecere__com__NameSpace publicNameSpace; -} __attribute__ ((gcc_struct)); +} ecere_gcc_struct; void __ecereMethod___ecereNameSpace__ecere__sys__BTNode_OnSerialize(struct __ecereNameSpace__ecere__com__Class * class, struct __ecereNameSpace__ecere__sys__BTNode * this, struct __ecereNameSpace__ecere__com__Instance * channel) { diff --git a/compiler/bootstrap/ecere/bootstrap/BinaryTree.c b/compiler/bootstrap/ecere/bootstrap/BinaryTree.c index 4e678df..1cf5016 100644 --- a/compiler/bootstrap/ecere/bootstrap/BinaryTree.c +++ b/compiler/bootstrap/ecere/bootstrap/BinaryTree.c @@ -38,11 +38,14 @@ typedef unsigned __int64 uint64; #if defined(_WIN32) # if defined(__GNUC__) || defined(__TINYC__) # define ecere_stdcall __attribute__((__stdcall__)) +# define ecere_gcc_struct __attribute__((gcc_struct)) # else # define ecere_stdcall __stdcall +# define ecere_gcc_struct # endif #else # define ecere_stdcall +# define ecere_gcc_struct #endif #include #include @@ -59,7 +62,7 @@ void * last; int count; unsigned int offset; unsigned int circ; -} __attribute__ ((gcc_struct)); +} ecere_gcc_struct; struct __ecereNameSpace__ecere__com__DataValue { @@ -76,8 +79,8 @@ float f; double d; long long i64; uint64 ui64; -} __attribute__ ((gcc_struct)) __anon1; -} __attribute__ ((gcc_struct)); +} ecere_gcc_struct __anon1; +} ecere_gcc_struct; struct __ecereNameSpace__ecere__com__SerialBuffer { @@ -85,7 +88,7 @@ unsigned char * _buffer; unsigned int count; unsigned int _size; unsigned int pos; -} __attribute__ ((gcc_struct)); +} ecere_gcc_struct; extern void * __ecereNameSpace__ecere__com__eSystem_New(unsigned int size); @@ -123,7 +126,7 @@ struct __ecereNameSpace__ecere__sys__BTNode * parent; struct __ecereNameSpace__ecere__sys__BTNode * left; struct __ecereNameSpace__ecere__sys__BTNode * right; int depth; -} __attribute__ ((gcc_struct)); +} ecere_gcc_struct; int __ecereProp___ecereNameSpace__ecere__sys__BTNode_Get_count(struct __ecereNameSpace__ecere__sys__BTNode * this); @@ -152,7 +155,7 @@ struct __ecereNameSpace__ecere__com__Instance void * * _vTbl; struct __ecereNameSpace__ecere__com__Class * _class; int _refCount; -} __attribute__ ((gcc_struct)); +} ecere_gcc_struct; extern long long __ecereNameSpace__ecere__com__eClass_GetProperty(struct __ecereNameSpace__ecere__com__Class * _class, const char * name); @@ -184,7 +187,7 @@ const char * category; unsigned int compiled; unsigned int selfWatchable; unsigned int isWatchable; -} __attribute__ ((gcc_struct)); +} ecere_gcc_struct; extern void __ecereNameSpace__ecere__com__eInstance_FireSelfWatchers(struct __ecereNameSpace__ecere__com__Instance * instance, struct __ecereNameSpace__ecere__com__Property * _property); @@ -208,7 +211,7 @@ struct __ecereNameSpace__ecere__sys__BTNode * root; int count; int (* CompareKey)(struct __ecereNameSpace__ecere__sys__BinaryTree * tree, uintptr_t a, uintptr_t b); void (* FreeKey)(void * key); -} __attribute__ ((gcc_struct)); +} ecere_gcc_struct; struct __ecereNameSpace__ecere__sys__StringBinaryTree { @@ -216,7 +219,7 @@ struct __ecereNameSpace__ecere__sys__BTNode * root; int count; int (* CompareKey)(struct __ecereNameSpace__ecere__sys__BinaryTree * tree, uintptr_t a, uintptr_t b); void (* FreeKey)(void * key); -} __attribute__ ((gcc_struct)); +} ecere_gcc_struct; __attribute__((unused)) static struct __ecereNameSpace__ecere__sys__BinaryTree __ecereNameSpace__ecere__sys__dummy; @@ -345,7 +348,7 @@ struct __ecereNameSpace__ecere__sys__BinaryTree membersAlpha; int memberOffset; short structAlignment; short pointerAlignment; -} __attribute__ ((gcc_struct)); +} ecere_gcc_struct; extern struct __ecereNameSpace__ecere__com__DataMember * __ecereNameSpace__ecere__com__eClass_AddDataMember(struct __ecereNameSpace__ecere__com__Class * _class, const char * name, const char * type, unsigned int size, unsigned int alignment, int declMode); @@ -359,7 +362,7 @@ struct { const char * dataTypeString; struct __ecereNameSpace__ecere__com__Class * dataTypeClass; -} __attribute__ ((gcc_struct)) __anon1; +} ecere_gcc_struct __anon1; struct __ecereNameSpace__ecere__com__DataValue expression; struct { @@ -369,10 +372,10 @@ union struct __ecereNameSpace__ecere__com__DataMember * member; struct __ecereNameSpace__ecere__com__Property * prop; struct __ecereNameSpace__ecere__com__Method * method; -} __attribute__ ((gcc_struct)) __anon1; -} __attribute__ ((gcc_struct)) __anon2; -} __attribute__ ((gcc_struct)) __anon1; -} __attribute__ ((gcc_struct)); +} ecere_gcc_struct __anon1; +} ecere_gcc_struct __anon2; +} ecere_gcc_struct __anon1; +} ecere_gcc_struct; struct __ecereNameSpace__ecere__com__Method { @@ -389,7 +392,7 @@ void * symbol; const char * dataTypeString; struct __ecereNameSpace__ecere__com__Instance * dataType; int memberAccess; -} __attribute__ ((gcc_struct)); +} ecere_gcc_struct; extern struct __ecereNameSpace__ecere__com__Method * __ecereNameSpace__ecere__com__eClass_AddMethod(struct __ecereNameSpace__ecere__com__Class * _class, const char * name, const char * type, void * function, int declMode); @@ -413,7 +416,7 @@ struct __ecereNameSpace__ecere__sys__BinaryTree nameSpaces; struct __ecereNameSpace__ecere__sys__BinaryTree classes; struct __ecereNameSpace__ecere__sys__BinaryTree defines; struct __ecereNameSpace__ecere__sys__BinaryTree functions; -} __attribute__ ((gcc_struct)); +} ecere_gcc_struct; struct __ecereNameSpace__ecere__com__Class { @@ -472,7 +475,7 @@ struct __ecereNameSpace__ecere__sys__OldList templatized; int numParams; unsigned int isInstanceClass; unsigned int byValueSystemClass; -} __attribute__ ((gcc_struct)); +} ecere_gcc_struct; struct __ecereNameSpace__ecere__com__Application { @@ -483,7 +486,7 @@ unsigned int isGUIApp; struct __ecereNameSpace__ecere__sys__OldList allModules; char * parsedCommand; struct __ecereNameSpace__ecere__com__NameSpace systemNameSpace; -} __attribute__ ((gcc_struct)); +} ecere_gcc_struct; static struct __ecereNameSpace__ecere__com__Class * __ecereClass___ecereNameSpace__ecere__sys__BinaryTree; @@ -511,7 +514,7 @@ int importType; int origImportType; struct __ecereNameSpace__ecere__com__NameSpace privateNameSpace; struct __ecereNameSpace__ecere__com__NameSpace publicNameSpace; -} __attribute__ ((gcc_struct)); +} ecere_gcc_struct; void __ecereMethod___ecereNameSpace__ecere__sys__BinaryTree_OnSerialize(struct __ecereNameSpace__ecere__com__Class * class, struct __ecereNameSpace__ecere__sys__BinaryTree * this, struct __ecereNameSpace__ecere__com__Instance * channel) { diff --git a/compiler/bootstrap/ecere/bootstrap/BufferedFile.c b/compiler/bootstrap/ecere/bootstrap/BufferedFile.c index 0b88900..cbe8485 100644 --- a/compiler/bootstrap/ecere/bootstrap/BufferedFile.c +++ b/compiler/bootstrap/ecere/bootstrap/BufferedFile.c @@ -38,11 +38,14 @@ typedef unsigned __int64 uint64; #if defined(_WIN32) # if defined(__GNUC__) || defined(__TINYC__) # define ecere_stdcall __attribute__((__stdcall__)) +# define ecere_gcc_struct __attribute__((gcc_struct)) # else # define ecere_stdcall __stdcall +# define ecere_gcc_struct # endif #else # define ecere_stdcall +# define ecere_gcc_struct #endif #include #include @@ -57,7 +60,7 @@ void * last; int count; unsigned int offset; unsigned int circ; -} __attribute__ ((gcc_struct)); +} ecere_gcc_struct; struct __ecereNameSpace__ecere__com__DataValue { @@ -74,8 +77,8 @@ float f; double d; long long i64; uint64 ui64; -} __attribute__ ((gcc_struct)) __anon1; -} __attribute__ ((gcc_struct)); +} ecere_gcc_struct __anon1; +} ecere_gcc_struct; struct __ecereNameSpace__ecere__com__SerialBuffer { @@ -83,7 +86,7 @@ unsigned char * _buffer; unsigned int count; unsigned int _size; unsigned int pos; -} __attribute__ ((gcc_struct)); +} ecere_gcc_struct; extern void * __ecereNameSpace__ecere__com__eSystem_New(unsigned int size); @@ -99,7 +102,7 @@ struct __ecereNameSpace__ecere__sys__File { void * input; void * output; -} __attribute__ ((gcc_struct)); +} ecere_gcc_struct; extern void * memcpy(void * , const void * , size_t size); @@ -124,7 +127,7 @@ struct __ecereNameSpace__ecere__com__Instance void * * _vTbl; struct __ecereNameSpace__ecere__com__Class * _class; int _refCount; -} __attribute__ ((gcc_struct)); +} ecere_gcc_struct; extern long long __ecereNameSpace__ecere__com__eClass_GetProperty(struct __ecereNameSpace__ecere__com__Class * _class, const char * name); @@ -158,7 +161,7 @@ const char * category; unsigned int compiled; unsigned int selfWatchable; unsigned int isWatchable; -} __attribute__ ((gcc_struct)); +} ecere_gcc_struct; extern void __ecereNameSpace__ecere__com__eInstance_FireSelfWatchers(struct __ecereNameSpace__ecere__com__Instance * instance, struct __ecereNameSpace__ecere__com__Property * _property); @@ -182,7 +185,7 @@ unsigned char * buffer; unsigned int eof; unsigned int bufferRead; unsigned int fileSize; -} __attribute__ ((gcc_struct)); +} ecere_gcc_struct; extern struct __ecereNameSpace__ecere__com__Instance * __ecereNameSpace__ecere__sys__FileOpen(const char * fileName, int mode); @@ -228,7 +231,7 @@ struct __ecereNameSpace__ecere__sys__BTNode * root; int count; int (* CompareKey)(struct __ecereNameSpace__ecere__sys__BinaryTree * tree, uintptr_t a, uintptr_t b); void (* FreeKey)(void * key); -} __attribute__ ((gcc_struct)); +} ecere_gcc_struct; struct __ecereNameSpace__ecere__com__DataMember; @@ -252,7 +255,7 @@ struct __ecereNameSpace__ecere__sys__BinaryTree membersAlpha; int memberOffset; short structAlignment; short pointerAlignment; -} __attribute__ ((gcc_struct)); +} ecere_gcc_struct; struct __ecereNameSpace__ecere__com__Method; @@ -264,7 +267,7 @@ struct { const char * dataTypeString; struct __ecereNameSpace__ecere__com__Class * dataTypeClass; -} __attribute__ ((gcc_struct)) __anon1; +} ecere_gcc_struct __anon1; struct __ecereNameSpace__ecere__com__DataValue expression; struct { @@ -274,10 +277,10 @@ union struct __ecereNameSpace__ecere__com__DataMember * member; struct __ecereNameSpace__ecere__com__Property * prop; struct __ecereNameSpace__ecere__com__Method * method; -} __attribute__ ((gcc_struct)) __anon1; -} __attribute__ ((gcc_struct)) __anon2; -} __attribute__ ((gcc_struct)) __anon1; -} __attribute__ ((gcc_struct)); +} ecere_gcc_struct __anon1; +} ecere_gcc_struct __anon2; +} ecere_gcc_struct __anon1; +} ecere_gcc_struct; struct __ecereNameSpace__ecere__com__Method { @@ -294,7 +297,7 @@ void * symbol; const char * dataTypeString; struct __ecereNameSpace__ecere__com__Instance * dataType; int memberAccess; -} __attribute__ ((gcc_struct)); +} ecere_gcc_struct; extern struct __ecereNameSpace__ecere__com__Method * __ecereNameSpace__ecere__com__eClass_AddMethod(struct __ecereNameSpace__ecere__com__Class * _class, const char * name, const char * type, void * function, int declMode); @@ -320,7 +323,7 @@ struct __ecereNameSpace__ecere__sys__BinaryTree nameSpaces; struct __ecereNameSpace__ecere__sys__BinaryTree classes; struct __ecereNameSpace__ecere__sys__BinaryTree defines; struct __ecereNameSpace__ecere__sys__BinaryTree functions; -} __attribute__ ((gcc_struct)); +} ecere_gcc_struct; struct __ecereNameSpace__ecere__com__Class { @@ -379,7 +382,7 @@ struct __ecereNameSpace__ecere__sys__OldList templatized; int numParams; unsigned int isInstanceClass; unsigned int byValueSystemClass; -} __attribute__ ((gcc_struct)); +} ecere_gcc_struct; struct __ecereNameSpace__ecere__com__Application { @@ -390,7 +393,7 @@ unsigned int isGUIApp; struct __ecereNameSpace__ecere__sys__OldList allModules; char * parsedCommand; struct __ecereNameSpace__ecere__com__NameSpace systemNameSpace; -} __attribute__ ((gcc_struct)); +} ecere_gcc_struct; static struct __ecereNameSpace__ecere__com__Class * __ecereClass___ecereNameSpace__ecere__sys__BufferedFile; @@ -414,7 +417,7 @@ int importType; int origImportType; struct __ecereNameSpace__ecere__com__NameSpace privateNameSpace; struct __ecereNameSpace__ecere__com__NameSpace publicNameSpace; -} __attribute__ ((gcc_struct)); +} ecere_gcc_struct; unsigned int __ecereConstructor___ecereNameSpace__ecere__sys__BufferedFile(struct __ecereNameSpace__ecere__com__Instance * this) { diff --git a/compiler/bootstrap/ecere/bootstrap/BuiltInContainer.c b/compiler/bootstrap/ecere/bootstrap/BuiltInContainer.c index 86082cd..f7d6eee 100644 --- a/compiler/bootstrap/ecere/bootstrap/BuiltInContainer.c +++ b/compiler/bootstrap/ecere/bootstrap/BuiltInContainer.c @@ -38,11 +38,14 @@ typedef unsigned __int64 uint64; #if defined(_WIN32) # if defined(__GNUC__) || defined(__TINYC__) # define ecere_stdcall __attribute__((__stdcall__)) +# define ecere_gcc_struct __attribute__((gcc_struct)) # else # define ecere_stdcall __stdcall +# define ecere_gcc_struct # endif #else # define ecere_stdcall +# define ecere_gcc_struct #endif #include #include @@ -61,7 +64,7 @@ void * last; int count; unsigned int offset; unsigned int circ; -} __attribute__ ((gcc_struct)); +} ecere_gcc_struct; struct __ecereNameSpace__ecere__com__DataValue { @@ -78,8 +81,8 @@ float f; double d; long long i64; uint64 ui64; -} __attribute__ ((gcc_struct)) __anon1; -} __attribute__ ((gcc_struct)); +} ecere_gcc_struct __anon1; +} ecere_gcc_struct; struct __ecereNameSpace__ecere__com__SerialBuffer { @@ -87,7 +90,7 @@ unsigned char * _buffer; unsigned int count; unsigned int _size; unsigned int pos; -} __attribute__ ((gcc_struct)); +} ecere_gcc_struct; extern void * __ecereNameSpace__ecere__com__eSystem_New(unsigned int size); @@ -114,7 +117,7 @@ struct __ecereNameSpace__ecere__com__Instance void * * _vTbl; struct __ecereNameSpace__ecere__com__Class * _class; int _refCount; -} __attribute__ ((gcc_struct)); +} ecere_gcc_struct; struct __ecereNameSpace__ecere__com__BuiltInContainer { @@ -124,7 +127,7 @@ int _refCount; void * data; int count; struct __ecereNameSpace__ecere__com__Class * type; -} __attribute__ ((gcc_struct)); +} ecere_gcc_struct; extern long long __ecereNameSpace__ecere__com__eClass_GetProperty(struct __ecereNameSpace__ecere__com__Class * _class, const char * name); @@ -156,7 +159,7 @@ const char * category; unsigned int compiled; unsigned int selfWatchable; unsigned int isWatchable; -} __attribute__ ((gcc_struct)); +} ecere_gcc_struct; extern void __ecereNameSpace__ecere__com__eInstance_FireSelfWatchers(struct __ecereNameSpace__ecere__com__Instance * instance, struct __ecereNameSpace__ecere__com__Property * _property); @@ -260,7 +263,7 @@ struct __ecereNameSpace__ecere__sys__BTNode * root; int count; int (* CompareKey)(struct __ecereNameSpace__ecere__sys__BinaryTree * tree, uintptr_t a, uintptr_t b); void (* FreeKey)(void * key); -} __attribute__ ((gcc_struct)); +} ecere_gcc_struct; struct __ecereNameSpace__ecere__com__DataMember; @@ -284,7 +287,7 @@ struct __ecereNameSpace__ecere__sys__BinaryTree membersAlpha; int memberOffset; short structAlignment; short pointerAlignment; -} __attribute__ ((gcc_struct)); +} ecere_gcc_struct; extern struct __ecereNameSpace__ecere__com__DataMember * __ecereNameSpace__ecere__com__eClass_AddDataMember(struct __ecereNameSpace__ecere__com__Class * _class, const char * name, const char * type, unsigned int size, unsigned int alignment, int declMode); @@ -298,7 +301,7 @@ struct { const char * dataTypeString; struct __ecereNameSpace__ecere__com__Class * dataTypeClass; -} __attribute__ ((gcc_struct)) __anon1; +} ecere_gcc_struct __anon1; struct __ecereNameSpace__ecere__com__DataValue expression; struct { @@ -308,10 +311,10 @@ union struct __ecereNameSpace__ecere__com__DataMember * member; struct __ecereNameSpace__ecere__com__Property * prop; struct __ecereNameSpace__ecere__com__Method * method; -} __attribute__ ((gcc_struct)) __anon1; -} __attribute__ ((gcc_struct)) __anon2; -} __attribute__ ((gcc_struct)) __anon1; -} __attribute__ ((gcc_struct)); +} ecere_gcc_struct __anon1; +} ecere_gcc_struct __anon2; +} ecere_gcc_struct __anon1; +} ecere_gcc_struct; struct __ecereNameSpace__ecere__com__Method { @@ -328,7 +331,7 @@ void * symbol; const char * dataTypeString; struct __ecereNameSpace__ecere__com__Instance * dataType; int memberAccess; -} __attribute__ ((gcc_struct)); +} ecere_gcc_struct; extern struct __ecereNameSpace__ecere__com__Method * __ecereNameSpace__ecere__com__eClass_AddMethod(struct __ecereNameSpace__ecere__com__Class * _class, const char * name, const char * type, void * function, int declMode); @@ -354,7 +357,7 @@ struct __ecereNameSpace__ecere__sys__BinaryTree nameSpaces; struct __ecereNameSpace__ecere__sys__BinaryTree classes; struct __ecereNameSpace__ecere__sys__BinaryTree defines; struct __ecereNameSpace__ecere__sys__BinaryTree functions; -} __attribute__ ((gcc_struct)); +} ecere_gcc_struct; struct __ecereNameSpace__ecere__com__Class { @@ -413,7 +416,7 @@ struct __ecereNameSpace__ecere__sys__OldList templatized; int numParams; unsigned int isInstanceClass; unsigned int byValueSystemClass; -} __attribute__ ((gcc_struct)); +} ecere_gcc_struct; struct __ecereNameSpace__ecere__com__Application { @@ -424,7 +427,7 @@ unsigned int isGUIApp; struct __ecereNameSpace__ecere__sys__OldList allModules; char * parsedCommand; struct __ecereNameSpace__ecere__com__NameSpace systemNameSpace; -} __attribute__ ((gcc_struct)); +} ecere_gcc_struct; static struct __ecereNameSpace__ecere__com__Class * __ecereClass___ecereNameSpace__ecere__com__IteratorPointer; @@ -504,7 +507,7 @@ int importType; int origImportType; struct __ecereNameSpace__ecere__com__NameSpace privateNameSpace; struct __ecereNameSpace__ecere__com__NameSpace publicNameSpace; -} __attribute__ ((gcc_struct)); +} ecere_gcc_struct; void __ecereMethod___ecereNameSpace__ecere__com__BuiltInContainer_RemoveAll(struct __ecereNameSpace__ecere__com__BuiltInContainer * this) { diff --git a/compiler/bootstrap/ecere/bootstrap/Container.c b/compiler/bootstrap/ecere/bootstrap/Container.c index afc84eb..6f02df4 100644 --- a/compiler/bootstrap/ecere/bootstrap/Container.c +++ b/compiler/bootstrap/ecere/bootstrap/Container.c @@ -38,11 +38,14 @@ typedef unsigned __int64 uint64; #if defined(_WIN32) # if defined(__GNUC__) || defined(__TINYC__) # define ecere_stdcall __attribute__((__stdcall__)) +# define ecere_gcc_struct __attribute__((gcc_struct)) # else # define ecere_stdcall __stdcall +# define ecere_gcc_struct # endif #else # define ecere_stdcall +# define ecere_gcc_struct #endif #include #include @@ -65,7 +68,7 @@ void * last; int count; unsigned int offset; unsigned int circ; -} __attribute__ ((gcc_struct)); +} ecere_gcc_struct; struct __ecereNameSpace__ecere__com__DataValue { @@ -82,8 +85,8 @@ float f; double d; long long i64; uint64 ui64; -} __attribute__ ((gcc_struct)) __anon1; -} __attribute__ ((gcc_struct)); +} ecere_gcc_struct __anon1; +} ecere_gcc_struct; struct __ecereNameSpace__ecere__com__IteratorPointer; @@ -93,7 +96,7 @@ unsigned char * _buffer; unsigned int count; unsigned int _size; unsigned int pos; -} __attribute__ ((gcc_struct)); +} ecere_gcc_struct; extern void * __ecereNameSpace__ecere__com__eSystem_New(unsigned int size); @@ -138,7 +141,7 @@ struct __ecereNameSpace__ecere__com__Instance void * * _vTbl; struct __ecereNameSpace__ecere__com__Class * _class; int _refCount; -} __attribute__ ((gcc_struct)); +} ecere_gcc_struct; extern long long __ecereNameSpace__ecere__com__eClass_GetProperty(struct __ecereNameSpace__ecere__com__Class * _class, const char * name); @@ -210,7 +213,7 @@ const char * category; unsigned int compiled; unsigned int selfWatchable; unsigned int isWatchable; -} __attribute__ ((gcc_struct)); +} ecere_gcc_struct; extern void __ecereNameSpace__ecere__com__eInstance_FireSelfWatchers(struct __ecereNameSpace__ecere__com__Instance * instance, struct __ecereNameSpace__ecere__com__Property * _property); @@ -226,7 +229,7 @@ struct __ecereNameSpace__ecere__com__Iterator { struct __ecereNameSpace__ecere__com__Instance * container; struct __ecereNameSpace__ecere__com__IteratorPointer * pointer; -} __attribute__ ((gcc_struct)); +} ecere_gcc_struct; void __ecereProp___ecereNameSpace__ecere__com__Container_Set_copySrc(struct __ecereNameSpace__ecere__com__Instance * this, struct __ecereNameSpace__ecere__com__Instance * value); @@ -278,7 +281,7 @@ struct __ecereNameSpace__ecere__sys__BTNode * root; int count; int (* CompareKey)(struct __ecereNameSpace__ecere__sys__BinaryTree * tree, uintptr_t a, uintptr_t b); void (* FreeKey)(void * key); -} __attribute__ ((gcc_struct)); +} ecere_gcc_struct; struct __ecereNameSpace__ecere__com__DataMember; @@ -302,7 +305,7 @@ struct __ecereNameSpace__ecere__sys__BinaryTree membersAlpha; int memberOffset; short structAlignment; short pointerAlignment; -} __attribute__ ((gcc_struct)); +} ecere_gcc_struct; extern struct __ecereNameSpace__ecere__com__DataMember * __ecereNameSpace__ecere__com__eClass_AddDataMember(struct __ecereNameSpace__ecere__com__Class * _class, const char * name, const char * type, unsigned int size, unsigned int alignment, int declMode); @@ -316,7 +319,7 @@ struct { const char * dataTypeString; struct __ecereNameSpace__ecere__com__Class * dataTypeClass; -} __attribute__ ((gcc_struct)) __anon1; +} ecere_gcc_struct __anon1; struct __ecereNameSpace__ecere__com__DataValue expression; struct { @@ -326,10 +329,10 @@ union struct __ecereNameSpace__ecere__com__DataMember * member; struct __ecereNameSpace__ecere__com__Property * prop; struct __ecereNameSpace__ecere__com__Method * method; -} __attribute__ ((gcc_struct)) __anon1; -} __attribute__ ((gcc_struct)) __anon2; -} __attribute__ ((gcc_struct)) __anon1; -} __attribute__ ((gcc_struct)); +} ecere_gcc_struct __anon1; +} ecere_gcc_struct __anon2; +} ecere_gcc_struct __anon1; +} ecere_gcc_struct; struct __ecereNameSpace__ecere__com__Method { @@ -346,7 +349,7 @@ void * symbol; const char * dataTypeString; struct __ecereNameSpace__ecere__com__Instance * dataType; int memberAccess; -} __attribute__ ((gcc_struct)); +} ecere_gcc_struct; extern struct __ecereNameSpace__ecere__com__Method * __ecereNameSpace__ecere__com__eClass_AddMethod(struct __ecereNameSpace__ecere__com__Class * _class, const char * name, const char * type, void * function, int declMode); @@ -374,7 +377,7 @@ struct __ecereNameSpace__ecere__sys__BinaryTree nameSpaces; struct __ecereNameSpace__ecere__sys__BinaryTree classes; struct __ecereNameSpace__ecere__sys__BinaryTree defines; struct __ecereNameSpace__ecere__sys__BinaryTree functions; -} __attribute__ ((gcc_struct)); +} ecere_gcc_struct; struct __ecereNameSpace__ecere__com__Class { @@ -433,7 +436,7 @@ struct __ecereNameSpace__ecere__sys__OldList templatized; int numParams; unsigned int isInstanceClass; unsigned int byValueSystemClass; -} __attribute__ ((gcc_struct)); +} ecere_gcc_struct; struct __ecereNameSpace__ecere__com__Application { @@ -444,7 +447,7 @@ unsigned int isGUIApp; struct __ecereNameSpace__ecere__sys__OldList allModules; char * parsedCommand; struct __ecereNameSpace__ecere__com__NameSpace systemNameSpace; -} __attribute__ ((gcc_struct)); +} ecere_gcc_struct; static struct __ecereNameSpace__ecere__com__Class * __ecereClass___ecereNameSpace__ecere__com__Iterator; @@ -491,7 +494,7 @@ int importType; int origImportType; struct __ecereNameSpace__ecere__com__NameSpace privateNameSpace; struct __ecereNameSpace__ecere__com__NameSpace publicNameSpace; -} __attribute__ ((gcc_struct)); +} ecere_gcc_struct; uint64 __ecereProp___ecereNameSpace__ecere__com__Iterator_Get_data(struct __ecereNameSpace__ecere__com__Iterator * this) { diff --git a/compiler/bootstrap/ecere/bootstrap/CustomAVLTree.c b/compiler/bootstrap/ecere/bootstrap/CustomAVLTree.c index a5074de..a0496d0 100644 --- a/compiler/bootstrap/ecere/bootstrap/CustomAVLTree.c +++ b/compiler/bootstrap/ecere/bootstrap/CustomAVLTree.c @@ -38,11 +38,14 @@ typedef unsigned __int64 uint64; #if defined(_WIN32) # if defined(__GNUC__) || defined(__TINYC__) # define ecere_stdcall __attribute__((__stdcall__)) +# define ecere_gcc_struct __attribute__((gcc_struct)) # else # define ecere_stdcall __stdcall +# define ecere_gcc_struct # endif #else # define ecere_stdcall +# define ecere_gcc_struct #endif #include #include @@ -54,7 +57,7 @@ struct __ecereNameSpace__ecere__com__CustomAVLTree { struct __ecereNameSpace__ecere__com__AVLNode * root; int count; -} __attribute__ ((gcc_struct)); +} ecere_gcc_struct; struct __ecereNameSpace__ecere__sys__BTNode; @@ -65,7 +68,7 @@ void * last; int count; unsigned int offset; unsigned int circ; -} __attribute__ ((gcc_struct)); +} ecere_gcc_struct; struct __ecereNameSpace__ecere__com__DataValue { @@ -82,8 +85,8 @@ float f; double d; long long i64; uint64 ui64; -} __attribute__ ((gcc_struct)) __anon1; -} __attribute__ ((gcc_struct)); +} ecere_gcc_struct __anon1; +} ecere_gcc_struct; struct __ecereNameSpace__ecere__com__SerialBuffer { @@ -91,7 +94,7 @@ unsigned char * _buffer; unsigned int count; unsigned int _size; unsigned int pos; -} __attribute__ ((gcc_struct)); +} ecere_gcc_struct; extern void * __ecereNameSpace__ecere__com__eSystem_New(unsigned int size); @@ -132,7 +135,7 @@ struct __ecereNameSpace__ecere__com__AVLNode struct __ecereNameSpace__ecere__com__AVLNode * parent, * left, * right; int depth; uint64 key; -} __attribute__ ((gcc_struct)); +} ecere_gcc_struct; struct __ecereNameSpace__ecere__com__Class; @@ -304,7 +307,7 @@ struct __ecereNameSpace__ecere__com__Instance void * * _vTbl; struct __ecereNameSpace__ecere__com__Class * _class; int _refCount; -} __attribute__ ((gcc_struct)); +} ecere_gcc_struct; extern long long __ecereNameSpace__ecere__com__eClass_GetProperty(struct __ecereNameSpace__ecere__com__Class * _class, const char * name); @@ -395,7 +398,7 @@ const char * category; unsigned int compiled; unsigned int selfWatchable; unsigned int isWatchable; -} __attribute__ ((gcc_struct)); +} ecere_gcc_struct; extern void __ecereNameSpace__ecere__com__eInstance_FireSelfWatchers(struct __ecereNameSpace__ecere__com__Instance * instance, struct __ecereNameSpace__ecere__com__Property * _property); @@ -526,7 +529,7 @@ struct __ecereNameSpace__ecere__sys__BTNode * root; int count; int (* CompareKey)(struct __ecereNameSpace__ecere__sys__BinaryTree * tree, uintptr_t a, uintptr_t b); void (* FreeKey)(void * key); -} __attribute__ ((gcc_struct)); +} ecere_gcc_struct; struct __ecereNameSpace__ecere__com__AVLNode * __ecereMethod___ecereNameSpace__ecere__com__AVLNode_FindAll(struct __ecereNameSpace__ecere__com__AVLNode * this, const uint64 key); @@ -565,7 +568,7 @@ struct __ecereNameSpace__ecere__sys__BinaryTree membersAlpha; int memberOffset; short structAlignment; short pointerAlignment; -} __attribute__ ((gcc_struct)); +} ecere_gcc_struct; extern struct __ecereNameSpace__ecere__com__DataMember * __ecereNameSpace__ecere__com__eClass_AddDataMember(struct __ecereNameSpace__ecere__com__Class * _class, const char * name, const char * type, unsigned int size, unsigned int alignment, int declMode); @@ -579,7 +582,7 @@ struct { const char * dataTypeString; struct __ecereNameSpace__ecere__com__Class * dataTypeClass; -} __attribute__ ((gcc_struct)) __anon1; +} ecere_gcc_struct __anon1; struct __ecereNameSpace__ecere__com__DataValue expression; struct { @@ -589,10 +592,10 @@ union struct __ecereNameSpace__ecere__com__DataMember * member; struct __ecereNameSpace__ecere__com__Property * prop; struct __ecereNameSpace__ecere__com__Method * method; -} __attribute__ ((gcc_struct)) __anon1; -} __attribute__ ((gcc_struct)) __anon2; -} __attribute__ ((gcc_struct)) __anon1; -} __attribute__ ((gcc_struct)); +} ecere_gcc_struct __anon1; +} ecere_gcc_struct __anon2; +} ecere_gcc_struct __anon1; +} ecere_gcc_struct; struct __ecereNameSpace__ecere__com__Method { @@ -609,7 +612,7 @@ void * symbol; const char * dataTypeString; struct __ecereNameSpace__ecere__com__Instance * dataType; int memberAccess; -} __attribute__ ((gcc_struct)); +} ecere_gcc_struct; extern struct __ecereNameSpace__ecere__com__Method * __ecereNameSpace__ecere__com__eClass_AddMethod(struct __ecereNameSpace__ecere__com__Class * _class, const char * name, const char * type, void * function, int declMode); @@ -637,7 +640,7 @@ struct __ecereNameSpace__ecere__sys__BinaryTree nameSpaces; struct __ecereNameSpace__ecere__sys__BinaryTree classes; struct __ecereNameSpace__ecere__sys__BinaryTree defines; struct __ecereNameSpace__ecere__sys__BinaryTree functions; -} __attribute__ ((gcc_struct)); +} ecere_gcc_struct; struct __ecereNameSpace__ecere__com__Class { @@ -696,7 +699,7 @@ struct __ecereNameSpace__ecere__sys__OldList templatized; int numParams; unsigned int isInstanceClass; unsigned int byValueSystemClass; -} __attribute__ ((gcc_struct)); +} ecere_gcc_struct; struct __ecereNameSpace__ecere__com__Application { @@ -707,7 +710,7 @@ unsigned int isGUIApp; struct __ecereNameSpace__ecere__sys__OldList allModules; char * parsedCommand; struct __ecereNameSpace__ecere__com__NameSpace systemNameSpace; -} __attribute__ ((gcc_struct)); +} ecere_gcc_struct; static struct __ecereNameSpace__ecere__com__Class * __ecereClass___ecereNameSpace__ecere__com__AVLNode; @@ -769,7 +772,7 @@ int importType; int origImportType; struct __ecereNameSpace__ecere__com__NameSpace privateNameSpace; struct __ecereNameSpace__ecere__com__NameSpace publicNameSpace; -} __attribute__ ((gcc_struct)); +} ecere_gcc_struct; struct __ecereNameSpace__ecere__com__IteratorPointer * __ecereMethod___ecereNameSpace__ecere__com__CustomAVLTree_GetFirst(struct __ecereNameSpace__ecere__com__Instance * this) { diff --git a/compiler/bootstrap/ecere/bootstrap/DualPipe.c b/compiler/bootstrap/ecere/bootstrap/DualPipe.c index 4f7fbfb..1391050 100644 --- a/compiler/bootstrap/ecere/bootstrap/DualPipe.c +++ b/compiler/bootstrap/ecere/bootstrap/DualPipe.c @@ -38,11 +38,14 @@ typedef unsigned __int64 uint64; #if defined(_WIN32) # if defined(__GNUC__) || defined(__TINYC__) # define ecere_stdcall __attribute__((__stdcall__)) +# define ecere_gcc_struct __attribute__((gcc_struct)) # else # define ecere_stdcall __stdcall +# define ecere_gcc_struct # endif #else # define ecere_stdcall +# define ecere_gcc_struct #endif #include #include @@ -89,7 +92,7 @@ _DualPipe * _DualPipeOpen(unsigned int mode, const char * commandLine, const cha struct __ecereNameSpace__ecere__sys__DualPipe { void * dp; -} __attribute__ ((gcc_struct)); +} ecere_gcc_struct; extern struct __ecereNameSpace__ecere__com__Property * __ecereProp___ecereNameSpace__ecere__sys__File_input; @@ -104,7 +107,7 @@ void * last; int count; unsigned int offset; unsigned int circ; -} __attribute__ ((gcc_struct)); +} ecere_gcc_struct; struct __ecereNameSpace__ecere__com__DataValue { @@ -121,8 +124,8 @@ float f; double d; long long i64; uint64 ui64; -} __attribute__ ((gcc_struct)) __anon1; -} __attribute__ ((gcc_struct)); +} ecere_gcc_struct __anon1; +} ecere_gcc_struct; struct __ecereNameSpace__ecere__com__SerialBuffer { @@ -130,7 +133,7 @@ unsigned char * _buffer; unsigned int count; unsigned int _size; unsigned int pos; -} __attribute__ ((gcc_struct)); +} ecere_gcc_struct; extern void * __ecereNameSpace__ecere__com__eSystem_New(unsigned int size); @@ -155,7 +158,7 @@ struct __ecereNameSpace__ecere__com__Instance void * * _vTbl; struct __ecereNameSpace__ecere__com__Class * _class; int _refCount; -} __attribute__ ((gcc_struct)); +} ecere_gcc_struct; extern long long __ecereNameSpace__ecere__com__eClass_GetProperty(struct __ecereNameSpace__ecere__com__Class * _class, const char * name); @@ -225,7 +228,7 @@ const char * category; unsigned int compiled; unsigned int selfWatchable; unsigned int isWatchable; -} __attribute__ ((gcc_struct)); +} ecere_gcc_struct; extern void __ecereNameSpace__ecere__com__eInstance_FireSelfWatchers(struct __ecereNameSpace__ecere__com__Instance * instance, struct __ecereNameSpace__ecere__com__Property * _property); @@ -243,7 +246,7 @@ struct __ecereNameSpace__ecere__sys__BTNode * root; int count; int (* CompareKey)(struct __ecereNameSpace__ecere__sys__BinaryTree * tree, uintptr_t a, uintptr_t b); void (* FreeKey)(void * key); -} __attribute__ ((gcc_struct)); +} ecere_gcc_struct; struct __ecereNameSpace__ecere__com__Instance * __ecereNameSpace__ecere__sys__DualPipeOpen(unsigned int mode, const char * commandLine); @@ -290,7 +293,7 @@ void * symbol; const char * dataTypeString; struct __ecereNameSpace__ecere__com__Instance * dataType; int memberAccess; -} __attribute__ ((gcc_struct)); +} ecere_gcc_struct; extern struct __ecereNameSpace__ecere__com__Method * __ecereNameSpace__ecere__com__eClass_AddMethod(struct __ecereNameSpace__ecere__com__Class * _class, const char * name, const char * type, void * function, int declMode); @@ -316,7 +319,7 @@ struct __ecereNameSpace__ecere__sys__BinaryTree nameSpaces; struct __ecereNameSpace__ecere__sys__BinaryTree classes; struct __ecereNameSpace__ecere__sys__BinaryTree defines; struct __ecereNameSpace__ecere__sys__BinaryTree functions; -} __attribute__ ((gcc_struct)); +} ecere_gcc_struct; struct __ecereNameSpace__ecere__com__Application { @@ -327,7 +330,7 @@ unsigned int isGUIApp; struct __ecereNameSpace__ecere__sys__OldList allModules; char * parsedCommand; struct __ecereNameSpace__ecere__com__NameSpace systemNameSpace; -} __attribute__ ((gcc_struct)); +} ecere_gcc_struct; struct __ecereNameSpace__ecere__com__Module { @@ -345,7 +348,7 @@ int importType; int origImportType; struct __ecereNameSpace__ecere__com__NameSpace privateNameSpace; struct __ecereNameSpace__ecere__com__NameSpace publicNameSpace; -} __attribute__ ((gcc_struct)); +} ecere_gcc_struct; void __ecereUnregisterModule_DualPipe(struct __ecereNameSpace__ecere__com__Instance * module) { @@ -362,7 +365,7 @@ struct { const char * dataTypeString; struct __ecereNameSpace__ecere__com__Class * dataTypeClass; -} __attribute__ ((gcc_struct)) __anon1; +} ecere_gcc_struct __anon1; struct __ecereNameSpace__ecere__com__DataValue expression; struct { @@ -372,10 +375,10 @@ union struct __ecereNameSpace__ecere__com__DataMember * member; struct __ecereNameSpace__ecere__com__Property * prop; struct __ecereNameSpace__ecere__com__Method * method; -} __attribute__ ((gcc_struct)) __anon1; -} __attribute__ ((gcc_struct)) __anon2; -} __attribute__ ((gcc_struct)) __anon1; -} __attribute__ ((gcc_struct)); +} ecere_gcc_struct __anon1; +} ecere_gcc_struct __anon2; +} ecere_gcc_struct __anon1; +} ecere_gcc_struct; struct __ecereNameSpace__ecere__com__DataMember { @@ -397,7 +400,7 @@ struct __ecereNameSpace__ecere__sys__BinaryTree membersAlpha; int memberOffset; short structAlignment; short pointerAlignment; -} __attribute__ ((gcc_struct)); +} ecere_gcc_struct; struct __ecereNameSpace__ecere__com__Class { @@ -456,7 +459,7 @@ struct __ecereNameSpace__ecere__sys__OldList templatized; int numParams; unsigned int isInstanceClass; unsigned int byValueSystemClass; -} __attribute__ ((gcc_struct)); +} ecere_gcc_struct; static struct __ecereNameSpace__ecere__com__Class * __ecereClass___ecereNameSpace__ecere__sys__PipeOpenMode; diff --git a/compiler/bootstrap/ecere/bootstrap/File.c b/compiler/bootstrap/ecere/bootstrap/File.c index be4cf63..90b1055 100644 --- a/compiler/bootstrap/ecere/bootstrap/File.c +++ b/compiler/bootstrap/ecere/bootstrap/File.c @@ -38,11 +38,14 @@ typedef unsigned __int64 uint64; #if defined(_WIN32) # if defined(__GNUC__) || defined(__TINYC__) # define ecere_stdcall __attribute__((__stdcall__)) +# define ecere_gcc_struct __attribute__((gcc_struct)) # else # define ecere_stdcall __stdcall +# define ecere_gcc_struct # endif #else # define ecere_stdcall +# define ecere_gcc_struct #endif #include #include @@ -125,7 +128,7 @@ void FILE_FileOpen(const char * fileName, int mode, FILE ** input, FILE ** outpu struct __ecereNameSpace__ecere__sys__File { FILE * input, * output; -} __attribute__ ((gcc_struct)); +} ecere_gcc_struct; struct __ecereNameSpace__ecere__sys__FileStats { @@ -134,7 +137,7 @@ unsigned int size; int64 accessed; int64 modified; int64 created; -} __attribute__ ((gcc_struct)); +} ecere_gcc_struct; static int __ecereNameSpace__ecere__sys__openCount; @@ -156,7 +159,7 @@ void * last; int count; unsigned int offset; unsigned int circ; -} __attribute__ ((gcc_struct)); +} ecere_gcc_struct; struct __ecereNameSpace__ecere__com__DataValue { @@ -173,8 +176,8 @@ float f; double d; long long i64; uint64 ui64; -} __attribute__ ((gcc_struct)) __anon1; -} __attribute__ ((gcc_struct)); +} ecere_gcc_struct __anon1; +} ecere_gcc_struct; struct __ecereNameSpace__ecere__com__SerialBuffer { @@ -182,7 +185,7 @@ unsigned char * _buffer; unsigned int count; unsigned int _size; unsigned int pos; -} __attribute__ ((gcc_struct)); +} ecere_gcc_struct; extern void * __ecereNameSpace__ecere__com__eSystem_New(unsigned int size); @@ -210,7 +213,7 @@ unsigned int position; unsigned int eof; int openMode; unsigned int allocated; -} __attribute__ ((gcc_struct)); +} ecere_gcc_struct; extern int fputs(const char * , void * stream); @@ -335,7 +338,7 @@ struct __ecereNameSpace__ecere__com__Instance void * * _vTbl; struct __ecereNameSpace__ecere__com__Class * _class; int _refCount; -} __attribute__ ((gcc_struct)); +} ecere_gcc_struct; extern long long __ecereNameSpace__ecere__com__eClass_GetProperty(struct __ecereNameSpace__ecere__com__Class * _class, const char * name); @@ -425,7 +428,7 @@ const char * category; unsigned int compiled; unsigned int selfWatchable; unsigned int isWatchable; -} __attribute__ ((gcc_struct)); +} ecere_gcc_struct; extern void __ecereNameSpace__ecere__com__eInstance_FireSelfWatchers(struct __ecereNameSpace__ecere__com__Instance * instance, struct __ecereNameSpace__ecere__com__Property * _property); @@ -474,7 +477,7 @@ struct __ecereNameSpace__ecere__sys__BTNode * root; int count; int (* CompareKey)(struct __ecereNameSpace__ecere__sys__BinaryTree * tree, uintptr_t a, uintptr_t b); void (* FreeKey)(void * key); -} __attribute__ ((gcc_struct)); +} ecere_gcc_struct; struct __ecereNameSpace__ecere__com__DataMember; @@ -498,7 +501,7 @@ struct __ecereNameSpace__ecere__sys__BinaryTree membersAlpha; int memberOffset; short structAlignment; short pointerAlignment; -} __attribute__ ((gcc_struct)); +} ecere_gcc_struct; extern struct __ecereNameSpace__ecere__com__DataMember * __ecereNameSpace__ecere__com__eClass_AddDataMember(struct __ecereNameSpace__ecere__com__Class * _class, const char * name, const char * type, unsigned int size, unsigned int alignment, int declMode); @@ -512,7 +515,7 @@ struct { const char * dataTypeString; struct __ecereNameSpace__ecere__com__Class * dataTypeClass; -} __attribute__ ((gcc_struct)) __anon1; +} ecere_gcc_struct __anon1; struct __ecereNameSpace__ecere__com__DataValue expression; struct { @@ -522,10 +525,10 @@ union struct __ecereNameSpace__ecere__com__DataMember * member; struct __ecereNameSpace__ecere__com__Property * prop; struct __ecereNameSpace__ecere__com__Method * method; -} __attribute__ ((gcc_struct)) __anon1; -} __attribute__ ((gcc_struct)) __anon2; -} __attribute__ ((gcc_struct)) __anon1; -} __attribute__ ((gcc_struct)); +} ecere_gcc_struct __anon1; +} ecere_gcc_struct __anon2; +} ecere_gcc_struct __anon1; +} ecere_gcc_struct; struct __ecereNameSpace__ecere__com__Method { @@ -542,7 +545,7 @@ void * symbol; const char * dataTypeString; struct __ecereNameSpace__ecere__com__Instance * dataType; int memberAccess; -} __attribute__ ((gcc_struct)); +} ecere_gcc_struct; extern struct __ecereNameSpace__ecere__com__Method * __ecereNameSpace__ecere__com__eClass_AddMethod(struct __ecereNameSpace__ecere__com__Class * _class, const char * name, const char * type, void * function, int declMode); @@ -570,7 +573,7 @@ struct __ecereNameSpace__ecere__sys__BinaryTree nameSpaces; struct __ecereNameSpace__ecere__sys__BinaryTree classes; struct __ecereNameSpace__ecere__sys__BinaryTree defines; struct __ecereNameSpace__ecere__sys__BinaryTree functions; -} __attribute__ ((gcc_struct)); +} ecere_gcc_struct; struct __ecereNameSpace__ecere__com__Class { @@ -629,7 +632,7 @@ struct __ecereNameSpace__ecere__sys__OldList templatized; int numParams; unsigned int isInstanceClass; unsigned int byValueSystemClass; -} __attribute__ ((gcc_struct)); +} ecere_gcc_struct; struct __ecereNameSpace__ecere__com__Application { @@ -640,7 +643,7 @@ unsigned int isGUIApp; struct __ecereNameSpace__ecere__sys__OldList allModules; char * parsedCommand; struct __ecereNameSpace__ecere__com__NameSpace systemNameSpace; -} __attribute__ ((gcc_struct)); +} ecere_gcc_struct; static struct __ecereNameSpace__ecere__com__Class * __ecereClass___ecereNameSpace__ecere__sys__FileSize; @@ -764,7 +767,7 @@ int importType; int origImportType; struct __ecereNameSpace__ecere__com__NameSpace privateNameSpace; struct __ecereNameSpace__ecere__com__NameSpace publicNameSpace; -} __attribute__ ((gcc_struct)); +} ecere_gcc_struct; void __ecereDestructor___ecereNameSpace__ecere__sys__File(struct __ecereNameSpace__ecere__com__Instance * this) { diff --git a/compiler/bootstrap/ecere/bootstrap/LinkList.c b/compiler/bootstrap/ecere/bootstrap/LinkList.c index 5efd4b2..741551f 100644 --- a/compiler/bootstrap/ecere/bootstrap/LinkList.c +++ b/compiler/bootstrap/ecere/bootstrap/LinkList.c @@ -38,24 +38,27 @@ typedef unsigned __int64 uint64; #if defined(_WIN32) # if defined(__GNUC__) || defined(__TINYC__) # define ecere_stdcall __attribute__((__stdcall__)) +# define ecere_gcc_struct __attribute__((gcc_struct)) # else # define ecere_stdcall __stdcall +# define ecere_gcc_struct # endif #else # define ecere_stdcall +# define ecere_gcc_struct #endif #include #include struct __ecereNameSpace__ecere__com__LinkElement { void * prev, * next; -} __attribute__ ((gcc_struct)); +} ecere_gcc_struct; struct __ecereNameSpace__ecere__com__LinkList { void * first, * last; int count; -} __attribute__ ((gcc_struct)); +} ecere_gcc_struct; struct __ecereNameSpace__ecere__sys__BTNode; @@ -66,7 +69,7 @@ void * last; int count; unsigned int offset; unsigned int circ; -} __attribute__ ((gcc_struct)); +} ecere_gcc_struct; struct __ecereNameSpace__ecere__com__DataValue { @@ -83,8 +86,8 @@ float f; double d; long long i64; uint64 ui64; -} __attribute__ ((gcc_struct)) __anon1; -} __attribute__ ((gcc_struct)); +} ecere_gcc_struct __anon1; +} ecere_gcc_struct; struct __ecereNameSpace__ecere__com__SerialBuffer { @@ -92,7 +95,7 @@ unsigned char * _buffer; unsigned int count; unsigned int _size; unsigned int pos; -} __attribute__ ((gcc_struct)); +} ecere_gcc_struct; extern void * __ecereNameSpace__ecere__com__eSystem_New(unsigned int size); @@ -117,7 +120,7 @@ struct __ecereNameSpace__ecere__com__Instance void * * _vTbl; struct __ecereNameSpace__ecere__com__Class * _class; int _refCount; -} __attribute__ ((gcc_struct)); +} ecere_gcc_struct; extern long long __ecereNameSpace__ecere__com__eClass_GetProperty(struct __ecereNameSpace__ecere__com__Class * _class, const char * name); @@ -157,7 +160,7 @@ const char * category; unsigned int compiled; unsigned int selfWatchable; unsigned int isWatchable; -} __attribute__ ((gcc_struct)); +} ecere_gcc_struct; extern void __ecereNameSpace__ecere__com__eInstance_FireSelfWatchers(struct __ecereNameSpace__ecere__com__Instance * instance, struct __ecereNameSpace__ecere__com__Property * _property); @@ -187,7 +190,7 @@ struct __ecereNameSpace__ecere__sys__BTNode * root; int count; int (* CompareKey)(struct __ecereNameSpace__ecere__sys__BinaryTree * tree, uintptr_t a, uintptr_t b); void (* FreeKey)(void * key); -} __attribute__ ((gcc_struct)); +} ecere_gcc_struct; struct __ecereNameSpace__ecere__com__DataMember { @@ -209,7 +212,7 @@ struct __ecereNameSpace__ecere__sys__BinaryTree membersAlpha; int memberOffset; short structAlignment; short pointerAlignment; -} __attribute__ ((gcc_struct)); +} ecere_gcc_struct; struct __ecereNameSpace__ecere__com__ListItem; @@ -221,9 +224,9 @@ struct __ecereNameSpace__ecere__com__LinkElement link; struct { struct __ecereNameSpace__ecere__com__ListItem * prev, * next; -} __attribute__ ((gcc_struct)) __anon1; -} __attribute__ ((gcc_struct)) __anon1; -} __attribute__ ((gcc_struct)); +} ecere_gcc_struct __anon1; +} ecere_gcc_struct __anon1; +} ecere_gcc_struct; struct __ecereNameSpace__ecere__com__Method; @@ -235,7 +238,7 @@ struct { const char * dataTypeString; struct __ecereNameSpace__ecere__com__Class * dataTypeClass; -} __attribute__ ((gcc_struct)) __anon1; +} ecere_gcc_struct __anon1; struct __ecereNameSpace__ecere__com__DataValue expression; struct { @@ -245,10 +248,10 @@ union struct __ecereNameSpace__ecere__com__DataMember * member; struct __ecereNameSpace__ecere__com__Property * prop; struct __ecereNameSpace__ecere__com__Method * method; -} __attribute__ ((gcc_struct)) __anon1; -} __attribute__ ((gcc_struct)) __anon2; -} __attribute__ ((gcc_struct)) __anon1; -} __attribute__ ((gcc_struct)); +} ecere_gcc_struct __anon1; +} ecere_gcc_struct __anon2; +} ecere_gcc_struct __anon1; +} ecere_gcc_struct; struct __ecereNameSpace__ecere__com__Method { @@ -265,7 +268,7 @@ void * symbol; const char * dataTypeString; struct __ecereNameSpace__ecere__com__Instance * dataType; int memberAccess; -} __attribute__ ((gcc_struct)); +} ecere_gcc_struct; extern struct __ecereNameSpace__ecere__com__Method * __ecereNameSpace__ecere__com__eClass_AddMethod(struct __ecereNameSpace__ecere__com__Class * _class, const char * name, const char * type, void * function, int declMode); @@ -291,7 +294,7 @@ struct __ecereNameSpace__ecere__sys__BinaryTree nameSpaces; struct __ecereNameSpace__ecere__sys__BinaryTree classes; struct __ecereNameSpace__ecere__sys__BinaryTree defines; struct __ecereNameSpace__ecere__sys__BinaryTree functions; -} __attribute__ ((gcc_struct)); +} ecere_gcc_struct; struct __ecereNameSpace__ecere__com__Class { @@ -350,7 +353,7 @@ struct __ecereNameSpace__ecere__sys__OldList templatized; int numParams; unsigned int isInstanceClass; unsigned int byValueSystemClass; -} __attribute__ ((gcc_struct)); +} ecere_gcc_struct; struct __ecereNameSpace__ecere__com__Application { @@ -361,7 +364,7 @@ unsigned int isGUIApp; struct __ecereNameSpace__ecere__sys__OldList allModules; char * parsedCommand; struct __ecereNameSpace__ecere__com__NameSpace systemNameSpace; -} __attribute__ ((gcc_struct)); +} ecere_gcc_struct; static struct __ecereNameSpace__ecere__com__Class * __ecereClass___ecereNameSpace__ecere__com__LinkElement; @@ -389,7 +392,7 @@ int importType; int origImportType; struct __ecereNameSpace__ecere__com__NameSpace privateNameSpace; struct __ecereNameSpace__ecere__com__NameSpace publicNameSpace; -} __attribute__ ((gcc_struct)); +} ecere_gcc_struct; void * __ecereMethod___ecereNameSpace__ecere__com__LinkList_GetFirst(struct __ecereNameSpace__ecere__com__Instance * this) { diff --git a/compiler/bootstrap/ecere/bootstrap/List.c b/compiler/bootstrap/ecere/bootstrap/List.c index 6d5af4f..ac6f504 100644 --- a/compiler/bootstrap/ecere/bootstrap/List.c +++ b/compiler/bootstrap/ecere/bootstrap/List.c @@ -38,11 +38,14 @@ typedef unsigned __int64 uint64; #if defined(_WIN32) # if defined(__GNUC__) || defined(__TINYC__) # define ecere_stdcall __attribute__((__stdcall__)) +# define ecere_gcc_struct __attribute__((gcc_struct)) # else # define ecere_stdcall __stdcall +# define ecere_gcc_struct # endif #else # define ecere_stdcall +# define ecere_gcc_struct #endif #include #include @@ -50,7 +53,7 @@ struct __ecereNameSpace__ecere__com__LinkElement { void * prev; void * next; -} __attribute__ ((gcc_struct)); +} ecere_gcc_struct; struct __ecereNameSpace__ecere__sys__BTNode; @@ -61,7 +64,7 @@ void * last; int count; unsigned int offset; unsigned int circ; -} __attribute__ ((gcc_struct)); +} ecere_gcc_struct; struct __ecereNameSpace__ecere__com__DataValue { @@ -78,8 +81,8 @@ float f; double d; long long i64; uint64 ui64; -} __attribute__ ((gcc_struct)) __anon1; -} __attribute__ ((gcc_struct)); +} ecere_gcc_struct __anon1; +} ecere_gcc_struct; struct __ecereNameSpace__ecere__com__SerialBuffer { @@ -87,7 +90,7 @@ unsigned char * _buffer; unsigned int count; unsigned int _size; unsigned int pos; -} __attribute__ ((gcc_struct)); +} ecere_gcc_struct; extern void * __ecereNameSpace__ecere__com__eSystem_New(unsigned int size); @@ -106,7 +109,7 @@ struct __ecereNameSpace__ecere__com__LinkList void * first; void * last; int count; -} __attribute__ ((gcc_struct)); +} ecere_gcc_struct; struct __ecereNameSpace__ecere__com__ClassTemplateParameter; @@ -121,7 +124,7 @@ struct __ecereNameSpace__ecere__com__Instance void * * _vTbl; struct __ecereNameSpace__ecere__com__Class * _class; int _refCount; -} __attribute__ ((gcc_struct)); +} ecere_gcc_struct; extern long long __ecereNameSpace__ecere__com__eClass_GetProperty(struct __ecereNameSpace__ecere__com__Class * _class, const char * name); @@ -167,7 +170,7 @@ const char * category; unsigned int compiled; unsigned int selfWatchable; unsigned int isWatchable; -} __attribute__ ((gcc_struct)); +} ecere_gcc_struct; extern void __ecereNameSpace__ecere__com__eInstance_FireSelfWatchers(struct __ecereNameSpace__ecere__com__Instance * instance, struct __ecereNameSpace__ecere__com__Property * _property); @@ -188,10 +191,10 @@ struct { struct __ecereNameSpace__ecere__com__Link * prev; struct __ecereNameSpace__ecere__com__Link * next; -} __attribute__ ((gcc_struct)) __anon1; -} __attribute__ ((gcc_struct)) __anon1; +} ecere_gcc_struct __anon1; +} ecere_gcc_struct __anon1; uint64 data; -} __attribute__ ((gcc_struct)); +} ecere_gcc_struct; struct __ecereNameSpace__ecere__com__ListItem; @@ -204,9 +207,9 @@ struct { struct __ecereNameSpace__ecere__com__ListItem * prev; struct __ecereNameSpace__ecere__com__ListItem * next; -} __attribute__ ((gcc_struct)) __anon1; -} __attribute__ ((gcc_struct)) __anon1; -} __attribute__ ((gcc_struct)); +} ecere_gcc_struct __anon1; +} ecere_gcc_struct __anon1; +} ecere_gcc_struct; struct __ecereNameSpace__ecere__sys__BinaryTree; @@ -216,7 +219,7 @@ struct __ecereNameSpace__ecere__sys__BTNode * root; int count; int (* CompareKey)(struct __ecereNameSpace__ecere__sys__BinaryTree * tree, uintptr_t a, uintptr_t b); void (* FreeKey)(void * key); -} __attribute__ ((gcc_struct)); +} ecere_gcc_struct; struct __ecereNameSpace__ecere__com__DataMember; @@ -240,7 +243,7 @@ struct __ecereNameSpace__ecere__sys__BinaryTree membersAlpha; int memberOffset; short structAlignment; short pointerAlignment; -} __attribute__ ((gcc_struct)); +} ecere_gcc_struct; extern struct __ecereNameSpace__ecere__com__DataMember * __ecereNameSpace__ecere__com__eClass_AddDataMember(struct __ecereNameSpace__ecere__com__Class * _class, const char * name, const char * type, unsigned int size, unsigned int alignment, int declMode); @@ -254,7 +257,7 @@ struct { const char * dataTypeString; struct __ecereNameSpace__ecere__com__Class * dataTypeClass; -} __attribute__ ((gcc_struct)) __anon1; +} ecere_gcc_struct __anon1; struct __ecereNameSpace__ecere__com__DataValue expression; struct { @@ -264,10 +267,10 @@ union struct __ecereNameSpace__ecere__com__DataMember * member; struct __ecereNameSpace__ecere__com__Property * prop; struct __ecereNameSpace__ecere__com__Method * method; -} __attribute__ ((gcc_struct)) __anon1; -} __attribute__ ((gcc_struct)) __anon2; -} __attribute__ ((gcc_struct)) __anon1; -} __attribute__ ((gcc_struct)); +} ecere_gcc_struct __anon1; +} ecere_gcc_struct __anon2; +} ecere_gcc_struct __anon1; +} ecere_gcc_struct; struct __ecereNameSpace__ecere__com__Method { @@ -284,7 +287,7 @@ void * symbol; const char * dataTypeString; struct __ecereNameSpace__ecere__com__Instance * dataType; int memberAccess; -} __attribute__ ((gcc_struct)); +} ecere_gcc_struct; extern struct __ecereNameSpace__ecere__com__Method * __ecereNameSpace__ecere__com__eClass_AddMethod(struct __ecereNameSpace__ecere__com__Class * _class, const char * name, const char * type, void * function, int declMode); @@ -310,7 +313,7 @@ struct __ecereNameSpace__ecere__sys__BinaryTree nameSpaces; struct __ecereNameSpace__ecere__sys__BinaryTree classes; struct __ecereNameSpace__ecere__sys__BinaryTree defines; struct __ecereNameSpace__ecere__sys__BinaryTree functions; -} __attribute__ ((gcc_struct)); +} ecere_gcc_struct; struct __ecereNameSpace__ecere__com__Class { @@ -369,7 +372,7 @@ struct __ecereNameSpace__ecere__sys__OldList templatized; int numParams; unsigned int isInstanceClass; unsigned int byValueSystemClass; -} __attribute__ ((gcc_struct)); +} ecere_gcc_struct; struct __ecereNameSpace__ecere__com__Application { @@ -380,7 +383,7 @@ unsigned int isGUIApp; struct __ecereNameSpace__ecere__sys__OldList allModules; char * parsedCommand; struct __ecereNameSpace__ecere__com__NameSpace systemNameSpace; -} __attribute__ ((gcc_struct)); +} ecere_gcc_struct; static struct __ecereNameSpace__ecere__com__Class * __ecereClass___ecereNameSpace__ecere__com__Link; @@ -414,7 +417,7 @@ int importType; int origImportType; struct __ecereNameSpace__ecere__com__NameSpace privateNameSpace; struct __ecereNameSpace__ecere__com__NameSpace publicNameSpace; -} __attribute__ ((gcc_struct)); +} ecere_gcc_struct; uint64 __ecereMethod___ecereNameSpace__ecere__com__List_GetData(struct __ecereNameSpace__ecere__com__Instance * this, struct __ecereNameSpace__ecere__com__Link * link) { diff --git a/compiler/bootstrap/ecere/bootstrap/Map.c b/compiler/bootstrap/ecere/bootstrap/Map.c index cb477a9..b2801ed 100644 --- a/compiler/bootstrap/ecere/bootstrap/Map.c +++ b/compiler/bootstrap/ecere/bootstrap/Map.c @@ -38,11 +38,14 @@ typedef unsigned __int64 uint64; #if defined(_WIN32) # if defined(__GNUC__) || defined(__TINYC__) # define ecere_stdcall __attribute__((__stdcall__)) +# define ecere_gcc_struct __attribute__((gcc_struct)) # else # define ecere_stdcall __stdcall +# define ecere_gcc_struct # endif #else # define ecere_stdcall +# define ecere_gcc_struct #endif #include #include @@ -73,7 +76,7 @@ void * last; int count; unsigned int offset; unsigned int circ; -} __attribute__ ((gcc_struct)); +} ecere_gcc_struct; struct __ecereNameSpace__ecere__com__DataValue { @@ -90,8 +93,8 @@ float f; double d; long long i64; uint64 ui64; -} __attribute__ ((gcc_struct)) __anon1; -} __attribute__ ((gcc_struct)); +} ecere_gcc_struct __anon1; +} ecere_gcc_struct; struct __ecereNameSpace__ecere__com__IteratorPointer; @@ -101,7 +104,7 @@ unsigned char * _buffer; unsigned int count; unsigned int _size; unsigned int pos; -} __attribute__ ((gcc_struct)); +} ecere_gcc_struct; extern void * __ecereNameSpace__ecere__com__eSystem_New(unsigned int size); @@ -119,7 +122,7 @@ struct __ecereNameSpace__ecere__com__CustomAVLTree { struct __ecereNameSpace__ecere__com__AVLNode * root; int count; -} __attribute__ ((gcc_struct)); +} ecere_gcc_struct; struct __ecereNameSpace__ecere__com__ClassTemplateParameter; @@ -157,7 +160,7 @@ struct __ecereNameSpace__ecere__com__MapNode * right; int depth; uint64 key; uint64 value; -} __attribute__ ((gcc_struct)); +} ecere_gcc_struct; struct __ecereNameSpace__ecere__com__Class; @@ -184,7 +187,7 @@ struct __ecereNameSpace__ecere__com__Instance void * * _vTbl; struct __ecereNameSpace__ecere__com__Class * _class; int _refCount; -} __attribute__ ((gcc_struct)); +} ecere_gcc_struct; extern long long __ecereNameSpace__ecere__com__eClass_GetProperty(struct __ecereNameSpace__ecere__com__Class * _class, const char * name); @@ -202,7 +205,7 @@ struct __ecereNameSpace__ecere__com__MapIterator { struct __ecereNameSpace__ecere__com__Instance * container; struct __ecereNameSpace__ecere__com__IteratorPointer * pointer; -} __attribute__ ((gcc_struct)); +} ecere_gcc_struct; struct __ecereNameSpace__ecere__com__Property { @@ -228,7 +231,7 @@ const char * category; unsigned int compiled; unsigned int selfWatchable; unsigned int isWatchable; -} __attribute__ ((gcc_struct)); +} ecere_gcc_struct; extern void __ecereNameSpace__ecere__com__eInstance_FireSelfWatchers(struct __ecereNameSpace__ecere__com__Instance * instance, struct __ecereNameSpace__ecere__com__Property * _property); @@ -244,7 +247,7 @@ struct __ecereNameSpace__ecere__com__Iterator { struct __ecereNameSpace__ecere__com__Instance * container; struct __ecereNameSpace__ecere__com__IteratorPointer * pointer; -} __attribute__ ((gcc_struct)); +} ecere_gcc_struct; void __ecereProp___ecereNameSpace__ecere__com__Map_Set_mapSrc(struct __ecereNameSpace__ecere__com__Instance * this, struct __ecereNameSpace__ecere__com__Instance * value); @@ -293,7 +296,7 @@ struct __ecereNameSpace__ecere__com__AVLNode * left; struct __ecereNameSpace__ecere__com__AVLNode * right; int depth; uint64 key; -} __attribute__ ((gcc_struct)); +} ecere_gcc_struct; const uint64 __ecereProp___ecereNameSpace__ecere__com__MapNode_Get_key(struct __ecereNameSpace__ecere__com__MapNode * this) { @@ -343,7 +346,7 @@ struct __ecereNameSpace__ecere__sys__BTNode * root; int count; int (* CompareKey)(struct __ecereNameSpace__ecere__sys__BinaryTree * tree, uintptr_t a, uintptr_t b); void (* FreeKey)(void * key); -} __attribute__ ((gcc_struct)); +} ecere_gcc_struct; struct __ecereNameSpace__ecere__com__DataMember; @@ -367,7 +370,7 @@ struct __ecereNameSpace__ecere__sys__BinaryTree membersAlpha; int memberOffset; short structAlignment; short pointerAlignment; -} __attribute__ ((gcc_struct)); +} ecere_gcc_struct; extern struct __ecereNameSpace__ecere__com__DataMember * __ecereNameSpace__ecere__com__eClass_AddDataMember(struct __ecereNameSpace__ecere__com__Class * _class, const char * name, const char * type, unsigned int size, unsigned int alignment, int declMode); @@ -381,7 +384,7 @@ struct { const char * dataTypeString; struct __ecereNameSpace__ecere__com__Class * dataTypeClass; -} __attribute__ ((gcc_struct)) __anon1; +} ecere_gcc_struct __anon1; struct __ecereNameSpace__ecere__com__DataValue expression; struct { @@ -391,10 +394,10 @@ union struct __ecereNameSpace__ecere__com__DataMember * member; struct __ecereNameSpace__ecere__com__Property * prop; struct __ecereNameSpace__ecere__com__Method * method; -} __attribute__ ((gcc_struct)) __anon1; -} __attribute__ ((gcc_struct)) __anon2; -} __attribute__ ((gcc_struct)) __anon1; -} __attribute__ ((gcc_struct)); +} ecere_gcc_struct __anon1; +} ecere_gcc_struct __anon2; +} ecere_gcc_struct __anon1; +} ecere_gcc_struct; struct __ecereNameSpace__ecere__com__Method { @@ -411,7 +414,7 @@ void * symbol; const char * dataTypeString; struct __ecereNameSpace__ecere__com__Instance * dataType; int memberAccess; -} __attribute__ ((gcc_struct)); +} ecere_gcc_struct; extern struct __ecereNameSpace__ecere__com__Method * __ecereNameSpace__ecere__com__eClass_AddMethod(struct __ecereNameSpace__ecere__com__Class * _class, const char * name, const char * type, void * function, int declMode); @@ -444,7 +447,7 @@ struct __ecereNameSpace__ecere__sys__BinaryTree nameSpaces; struct __ecereNameSpace__ecere__sys__BinaryTree classes; struct __ecereNameSpace__ecere__sys__BinaryTree defines; struct __ecereNameSpace__ecere__sys__BinaryTree functions; -} __attribute__ ((gcc_struct)); +} ecere_gcc_struct; struct __ecereNameSpace__ecere__com__Class { @@ -503,7 +506,7 @@ struct __ecereNameSpace__ecere__sys__OldList templatized; int numParams; unsigned int isInstanceClass; unsigned int byValueSystemClass; -} __attribute__ ((gcc_struct)); +} ecere_gcc_struct; struct __ecereNameSpace__ecere__com__Application { @@ -514,7 +517,7 @@ unsigned int isGUIApp; struct __ecereNameSpace__ecere__sys__OldList allModules; char * parsedCommand; struct __ecereNameSpace__ecere__com__NameSpace systemNameSpace; -} __attribute__ ((gcc_struct)); +} ecere_gcc_struct; static struct __ecereNameSpace__ecere__com__Class * __ecereClass___ecereNameSpace__ecere__com__MapNode; @@ -558,7 +561,7 @@ int importType; int origImportType; struct __ecereNameSpace__ecere__com__NameSpace privateNameSpace; struct __ecereNameSpace__ecere__com__NameSpace publicNameSpace; -} __attribute__ ((gcc_struct)); +} ecere_gcc_struct; uint64 __ecereProp___ecereNameSpace__ecere__com__MapIterator_Get_value(struct __ecereNameSpace__ecere__com__MapIterator * this) { diff --git a/compiler/bootstrap/ecere/bootstrap/OldList.c b/compiler/bootstrap/ecere/bootstrap/OldList.c index 9ea552b..4852ffb 100644 --- a/compiler/bootstrap/ecere/bootstrap/OldList.c +++ b/compiler/bootstrap/ecere/bootstrap/OldList.c @@ -38,11 +38,14 @@ typedef unsigned __int64 uint64; #if defined(_WIN32) # if defined(__GNUC__) || defined(__TINYC__) # define ecere_stdcall __attribute__((__stdcall__)) +# define ecere_gcc_struct __attribute__((gcc_struct)) # else # define ecere_stdcall __stdcall +# define ecere_gcc_struct # endif #else # define ecere_stdcall +# define ecere_gcc_struct #endif #include #include @@ -52,7 +55,7 @@ void * first, * last; int count; unsigned int offset; unsigned int circ; -} __attribute__ ((gcc_struct)); +} ecere_gcc_struct; struct __ecereNameSpace__ecere__sys__BTNode; @@ -71,8 +74,8 @@ float f; double d; long long i64; uint64 ui64; -} __attribute__ ((gcc_struct)) __anon1; -} __attribute__ ((gcc_struct)); +} ecere_gcc_struct __anon1; +} ecere_gcc_struct; struct __ecereNameSpace__ecere__com__SerialBuffer { @@ -80,7 +83,7 @@ unsigned char * _buffer; unsigned int count; unsigned int _size; unsigned int pos; -} __attribute__ ((gcc_struct)); +} ecere_gcc_struct; extern void * __ecereNameSpace__ecere__com__eSystem_New(unsigned int size); @@ -109,7 +112,7 @@ struct __ecereNameSpace__ecere__sys__Item; struct __ecereNameSpace__ecere__sys__Item { struct __ecereNameSpace__ecere__sys__Item * prev, * next; -} __attribute__ ((gcc_struct)); +} ecere_gcc_struct; void __ecereMethod___ecereNameSpace__ecere__sys__Item_Copy(struct __ecereNameSpace__ecere__sys__Item * this, struct __ecereNameSpace__ecere__sys__Item * src, int size) { @@ -367,7 +370,7 @@ struct __ecereNameSpace__ecere__sys__NamedItem { struct __ecereNameSpace__ecere__sys__NamedItem * prev, * next; char * name; -} __attribute__ ((gcc_struct)); +} ecere_gcc_struct; void * __ecereMethod___ecereNameSpace__ecere__sys__OldList_FindName(struct __ecereNameSpace__ecere__sys__OldList * this, const char * name, unsigned int warn) { @@ -437,7 +440,7 @@ struct __ecereNameSpace__ecere__sys__OldLink { struct __ecereNameSpace__ecere__sys__OldLink * prev, * next; void * data; -} __attribute__ ((gcc_struct)); +} ecere_gcc_struct; void __ecereMethod___ecereNameSpace__ecere__sys__OldLink_Free(struct __ecereNameSpace__ecere__sys__OldLink * this) { @@ -465,7 +468,7 @@ struct __ecereNameSpace__ecere__sys__NamedLink struct __ecereNameSpace__ecere__sys__NamedLink * prev, * next; char * name; void * data; -} __attribute__ ((gcc_struct)); +} ecere_gcc_struct; void * __ecereMethod___ecereNameSpace__ecere__sys__OldList_FindNamedLink(struct __ecereNameSpace__ecere__sys__OldList * this, const char * name, unsigned int warn) { @@ -485,7 +488,7 @@ struct __ecereNameSpace__ecere__sys__NamedLink64 struct __ecereNameSpace__ecere__sys__NamedLink64 * prev, * next; char * name; long long data; -} __attribute__ ((gcc_struct)); +} ecere_gcc_struct; struct __ecereNameSpace__ecere__com__Class; @@ -494,7 +497,7 @@ struct __ecereNameSpace__ecere__com__Instance void * * _vTbl; struct __ecereNameSpace__ecere__com__Class * _class; int _refCount; -} __attribute__ ((gcc_struct)); +} ecere_gcc_struct; extern long long __ecereNameSpace__ecere__com__eClass_GetProperty(struct __ecereNameSpace__ecere__com__Class * _class, const char * name); @@ -530,7 +533,7 @@ const char * category; unsigned int compiled; unsigned int selfWatchable; unsigned int isWatchable; -} __attribute__ ((gcc_struct)); +} ecere_gcc_struct; extern void __ecereNameSpace__ecere__com__eInstance_FireSelfWatchers(struct __ecereNameSpace__ecere__com__Instance * instance, struct __ecereNameSpace__ecere__com__Property * _property); @@ -548,7 +551,7 @@ struct __ecereNameSpace__ecere__sys__BTNode * root; int count; int (* CompareKey)(struct __ecereNameSpace__ecere__sys__BinaryTree * tree, uintptr_t a, uintptr_t b); void (* FreeKey)(void * key); -} __attribute__ ((gcc_struct)); +} ecere_gcc_struct; void __ecereMethod___ecereNameSpace__ecere__sys__OldList_Sort(struct __ecereNameSpace__ecere__sys__OldList * this, int (* compare)(void * , void * , void * ), void * data); @@ -598,7 +601,7 @@ void * symbol; const char * dataTypeString; struct __ecereNameSpace__ecere__com__Instance * dataType; int memberAccess; -} __attribute__ ((gcc_struct)); +} ecere_gcc_struct; extern struct __ecereNameSpace__ecere__com__Method * __ecereNameSpace__ecere__com__eClass_AddMethod(struct __ecereNameSpace__ecere__com__Class * _class, const char * name, const char * type, void * function, int declMode); @@ -612,7 +615,7 @@ struct { const char * dataTypeString; struct __ecereNameSpace__ecere__com__Class * dataTypeClass; -} __attribute__ ((gcc_struct)) __anon1; +} ecere_gcc_struct __anon1; struct __ecereNameSpace__ecere__com__DataValue expression; struct { @@ -622,10 +625,10 @@ union struct __ecereNameSpace__ecere__com__DataMember * member; struct __ecereNameSpace__ecere__com__Property * prop; struct __ecereNameSpace__ecere__com__Method * method; -} __attribute__ ((gcc_struct)) __anon1; -} __attribute__ ((gcc_struct)) __anon2; -} __attribute__ ((gcc_struct)) __anon1; -} __attribute__ ((gcc_struct)); +} ecere_gcc_struct __anon1; +} ecere_gcc_struct __anon2; +} ecere_gcc_struct __anon1; +} ecere_gcc_struct; struct __ecereNameSpace__ecere__com__DataMember { @@ -647,7 +650,7 @@ struct __ecereNameSpace__ecere__sys__BinaryTree membersAlpha; int memberOffset; short structAlignment; short pointerAlignment; -} __attribute__ ((gcc_struct)); +} ecere_gcc_struct; extern struct __ecereNameSpace__ecere__com__DataMember * __ecereNameSpace__ecere__com__eClass_AddDataMember(struct __ecereNameSpace__ecere__com__Class * _class, const char * name, const char * type, unsigned int size, unsigned int alignment, int declMode); @@ -671,7 +674,7 @@ struct __ecereNameSpace__ecere__sys__BinaryTree nameSpaces; struct __ecereNameSpace__ecere__sys__BinaryTree classes; struct __ecereNameSpace__ecere__sys__BinaryTree defines; struct __ecereNameSpace__ecere__sys__BinaryTree functions; -} __attribute__ ((gcc_struct)); +} ecere_gcc_struct; struct __ecereNameSpace__ecere__com__Class { @@ -730,7 +733,7 @@ struct __ecereNameSpace__ecere__sys__OldList templatized; int numParams; unsigned int isInstanceClass; unsigned int byValueSystemClass; -} __attribute__ ((gcc_struct)); +} ecere_gcc_struct; struct __ecereNameSpace__ecere__com__Application { @@ -741,7 +744,7 @@ unsigned int isGUIApp; struct __ecereNameSpace__ecere__sys__OldList allModules; char * parsedCommand; struct __ecereNameSpace__ecere__com__NameSpace systemNameSpace; -} __attribute__ ((gcc_struct)); +} ecere_gcc_struct; static struct __ecereNameSpace__ecere__com__Class * __ecereClass___ecereNameSpace__ecere__sys__Item; @@ -773,7 +776,7 @@ int importType; int origImportType; struct __ecereNameSpace__ecere__com__NameSpace privateNameSpace; struct __ecereNameSpace__ecere__com__NameSpace publicNameSpace; -} __attribute__ ((gcc_struct)); +} ecere_gcc_struct; void __ecereRegisterModule_OldList(struct __ecereNameSpace__ecere__com__Instance * module) { diff --git a/compiler/bootstrap/ecere/bootstrap/String.c b/compiler/bootstrap/ecere/bootstrap/String.c index 83204de..f2700aa 100644 --- a/compiler/bootstrap/ecere/bootstrap/String.c +++ b/compiler/bootstrap/ecere/bootstrap/String.c @@ -38,11 +38,14 @@ typedef unsigned __int64 uint64; #if defined(_WIN32) # if defined(__GNUC__) || defined(__TINYC__) # define ecere_stdcall __attribute__((__stdcall__)) +# define ecere_gcc_struct __attribute__((gcc_struct)) # else # define ecere_stdcall __stdcall +# define ecere_gcc_struct # endif #else # define ecere_stdcall +# define ecere_gcc_struct #endif #include #include @@ -147,7 +150,7 @@ void * last; int count; unsigned int offset; unsigned int circ; -} __attribute__ ((gcc_struct)); +} ecere_gcc_struct; struct __ecereNameSpace__ecere__com__DataValue { @@ -164,8 +167,8 @@ float f; double d; long long i64; uint64 ui64; -} __attribute__ ((gcc_struct)) __anon1; -} __attribute__ ((gcc_struct)); +} ecere_gcc_struct __anon1; +} ecere_gcc_struct; struct __ecereNameSpace__ecere__com__SerialBuffer { @@ -173,7 +176,7 @@ unsigned char * _buffer; unsigned int count; unsigned int _size; unsigned int pos; -} __attribute__ ((gcc_struct)); +} ecere_gcc_struct; extern void * __ecereNameSpace__ecere__com__eSystem_New(unsigned int size); @@ -1266,7 +1269,7 @@ struct __ecereNameSpace__ecere__com__Instance void * * _vTbl; struct __ecereNameSpace__ecere__com__Class * _class; int _refCount; -} __attribute__ ((gcc_struct)); +} ecere_gcc_struct; extern long long __ecereNameSpace__ecere__com__eClass_GetProperty(struct __ecereNameSpace__ecere__com__Class * _class, const char * name); @@ -1304,7 +1307,7 @@ const char * category; unsigned int compiled; unsigned int selfWatchable; unsigned int isWatchable; -} __attribute__ ((gcc_struct)); +} ecere_gcc_struct; extern void __ecereNameSpace__ecere__com__eInstance_FireSelfWatchers(struct __ecereNameSpace__ecere__com__Instance * instance, struct __ecereNameSpace__ecere__com__Property * _property); @@ -1322,7 +1325,7 @@ struct __ecereNameSpace__ecere__sys__BTNode * root; int count; int (* CompareKey)(struct __ecereNameSpace__ecere__sys__BinaryTree * tree, uintptr_t a, uintptr_t b); void (* FreeKey)(void * key); -} __attribute__ ((gcc_struct)); +} ecere_gcc_struct; struct __ecereNameSpace__ecere__com__Method; @@ -1341,7 +1344,7 @@ void * symbol; const char * dataTypeString; struct __ecereNameSpace__ecere__com__Instance * dataType; int memberAccess; -} __attribute__ ((gcc_struct)); +} ecere_gcc_struct; struct __ecereNameSpace__ecere__com__Module; @@ -1367,7 +1370,7 @@ struct __ecereNameSpace__ecere__sys__BinaryTree nameSpaces; struct __ecereNameSpace__ecere__sys__BinaryTree classes; struct __ecereNameSpace__ecere__sys__BinaryTree defines; struct __ecereNameSpace__ecere__sys__BinaryTree functions; -} __attribute__ ((gcc_struct)); +} ecere_gcc_struct; struct __ecereNameSpace__ecere__com__Application { @@ -1378,7 +1381,7 @@ unsigned int isGUIApp; struct __ecereNameSpace__ecere__sys__OldList allModules; char * parsedCommand; struct __ecereNameSpace__ecere__com__NameSpace systemNameSpace; -} __attribute__ ((gcc_struct)); +} ecere_gcc_struct; struct __ecereNameSpace__ecere__com__Module { @@ -1396,7 +1399,7 @@ int importType; int origImportType; struct __ecereNameSpace__ecere__com__NameSpace privateNameSpace; struct __ecereNameSpace__ecere__com__NameSpace publicNameSpace; -} __attribute__ ((gcc_struct)); +} ecere_gcc_struct; void __ecereUnregisterModule_String(struct __ecereNameSpace__ecere__com__Instance * module) { @@ -1413,7 +1416,7 @@ struct { const char * dataTypeString; struct __ecereNameSpace__ecere__com__Class * dataTypeClass; -} __attribute__ ((gcc_struct)) __anon1; +} ecere_gcc_struct __anon1; struct __ecereNameSpace__ecere__com__DataValue expression; struct { @@ -1423,10 +1426,10 @@ union struct __ecereNameSpace__ecere__com__DataMember * member; struct __ecereNameSpace__ecere__com__Property * prop; struct __ecereNameSpace__ecere__com__Method * method; -} __attribute__ ((gcc_struct)) __anon1; -} __attribute__ ((gcc_struct)) __anon2; -} __attribute__ ((gcc_struct)) __anon1; -} __attribute__ ((gcc_struct)); +} ecere_gcc_struct __anon1; +} ecere_gcc_struct __anon2; +} ecere_gcc_struct __anon1; +} ecere_gcc_struct; struct __ecereNameSpace__ecere__com__DataMember { @@ -1448,7 +1451,7 @@ struct __ecereNameSpace__ecere__sys__BinaryTree membersAlpha; int memberOffset; short structAlignment; short pointerAlignment; -} __attribute__ ((gcc_struct)); +} ecere_gcc_struct; struct __ecereNameSpace__ecere__com__Class { @@ -1507,7 +1510,7 @@ struct __ecereNameSpace__ecere__sys__OldList templatized; int numParams; unsigned int isInstanceClass; unsigned int byValueSystemClass; -} __attribute__ ((gcc_struct)); +} ecere_gcc_struct; static struct __ecereNameSpace__ecere__com__Class * __ecereClass___ecereNameSpace__ecere__sys__BackSlashEscaping; diff --git a/compiler/bootstrap/ecere/bootstrap/System.c b/compiler/bootstrap/ecere/bootstrap/System.c index c2934c2..c9294eb 100644 --- a/compiler/bootstrap/ecere/bootstrap/System.c +++ b/compiler/bootstrap/ecere/bootstrap/System.c @@ -38,11 +38,14 @@ typedef unsigned __int64 uint64; #if defined(_WIN32) # if defined(__GNUC__) || defined(__TINYC__) # define ecere_stdcall __attribute__((__stdcall__)) +# define ecere_gcc_struct __attribute__((gcc_struct)) # else # define ecere_stdcall __stdcall +# define ecere_gcc_struct # endif #else # define ecere_stdcall +# define ecere_gcc_struct #endif #include #include @@ -145,7 +148,7 @@ int errorBufferSize; char logFile[797]; unsigned int lastErrorCode; int errorLevel; -} __attribute__ ((gcc_struct)); +} ecere_gcc_struct; struct __ecereNameSpace__ecere__sys__BTNode; @@ -156,7 +159,7 @@ void * last; int count; unsigned int offset; unsigned int circ; -} __attribute__ ((gcc_struct)); +} ecere_gcc_struct; struct __ecereNameSpace__ecere__com__DataValue { @@ -173,8 +176,8 @@ float f; double d; long long i64; uint64 ui64; -} __attribute__ ((gcc_struct)) __anon1; -} __attribute__ ((gcc_struct)); +} ecere_gcc_struct __anon1; +} ecere_gcc_struct; struct __ecereNameSpace__ecere__com__SerialBuffer { @@ -182,7 +185,7 @@ unsigned char * _buffer; unsigned int count; unsigned int _size; unsigned int pos; -} __attribute__ ((gcc_struct)); +} ecere_gcc_struct; extern void * __ecereNameSpace__ecere__com__eSystem_New(unsigned int size); @@ -199,7 +202,7 @@ struct __ecereNameSpace__ecere__com__Array uint64 * array; unsigned int count; unsigned int minAllocSize; -} __attribute__ ((gcc_struct)); +} ecere_gcc_struct; extern const char * __ecereNameSpace__ecere__GetTranslatedString(const char * name, const char * string, const char * stringAndContext); @@ -209,7 +212,7 @@ struct __ecereNameSpace__ecere__sys__File { void * input; void * output; -} __attribute__ ((gcc_struct)); +} ecere_gcc_struct; extern char * strcat(char * , const char * ); @@ -366,7 +369,7 @@ struct __ecereNameSpace__ecere__com__Instance void * * _vTbl; struct __ecereNameSpace__ecere__com__Class * _class; int _refCount; -} __attribute__ ((gcc_struct)); +} ecere_gcc_struct; extern long long __ecereNameSpace__ecere__com__eClass_GetProperty(struct __ecereNameSpace__ecere__com__Class * _class, const char * name); @@ -380,7 +383,7 @@ int _refCount; void * data; int count; struct __ecereNameSpace__ecere__com__Class * type; -} __attribute__ ((gcc_struct)); +} ecere_gcc_struct; extern void __ecereNameSpace__ecere__com__eEnum_AddFixedValue(struct __ecereNameSpace__ecere__com__Class * _class, const char * string, long long value); @@ -467,7 +470,7 @@ const char * category; unsigned int compiled; unsigned int selfWatchable; unsigned int isWatchable; -} __attribute__ ((gcc_struct)); +} ecere_gcc_struct; extern void __ecereNameSpace__ecere__com__eInstance_FireSelfWatchers(struct __ecereNameSpace__ecere__com__Instance * instance, struct __ecereNameSpace__ecere__com__Property * _property); @@ -499,7 +502,7 @@ struct __ecereNameSpace__ecere__sys__BTNode * root; int count; int (* CompareKey)(struct __ecereNameSpace__ecere__sys__BinaryTree * tree, uintptr_t a, uintptr_t b); void (* FreeKey)(void * key); -} __attribute__ ((gcc_struct)); +} ecere_gcc_struct; struct __ecereNameSpace__ecere__com__DataMember; @@ -523,7 +526,7 @@ struct __ecereNameSpace__ecere__sys__BinaryTree membersAlpha; int memberOffset; short structAlignment; short pointerAlignment; -} __attribute__ ((gcc_struct)); +} ecere_gcc_struct; extern struct __ecereNameSpace__ecere__com__DataMember * __ecereNameSpace__ecere__com__eClass_AddDataMember(struct __ecereNameSpace__ecere__com__Class * _class, const char * name, const char * type, unsigned int size, unsigned int alignment, int declMode); @@ -537,7 +540,7 @@ struct { const char * dataTypeString; struct __ecereNameSpace__ecere__com__Class * dataTypeClass; -} __attribute__ ((gcc_struct)) __anon1; +} ecere_gcc_struct __anon1; struct __ecereNameSpace__ecere__com__DataValue expression; struct { @@ -547,10 +550,10 @@ union struct __ecereNameSpace__ecere__com__DataMember * member; struct __ecereNameSpace__ecere__com__Property * prop; struct __ecereNameSpace__ecere__com__Method * method; -} __attribute__ ((gcc_struct)) __anon1; -} __attribute__ ((gcc_struct)) __anon2; -} __attribute__ ((gcc_struct)) __anon1; -} __attribute__ ((gcc_struct)); +} ecere_gcc_struct __anon1; +} ecere_gcc_struct __anon2; +} ecere_gcc_struct __anon1; +} ecere_gcc_struct; struct __ecereNameSpace__ecere__com__Method { @@ -567,7 +570,7 @@ void * symbol; const char * dataTypeString; struct __ecereNameSpace__ecere__com__Instance * dataType; int memberAccess; -} __attribute__ ((gcc_struct)); +} ecere_gcc_struct; struct __ecereNameSpace__ecere__com__Module; @@ -593,7 +596,7 @@ struct __ecereNameSpace__ecere__sys__BinaryTree nameSpaces; struct __ecereNameSpace__ecere__sys__BinaryTree classes; struct __ecereNameSpace__ecere__sys__BinaryTree defines; struct __ecereNameSpace__ecere__sys__BinaryTree functions; -} __attribute__ ((gcc_struct)); +} ecere_gcc_struct; struct __ecereNameSpace__ecere__com__Class { @@ -652,7 +655,7 @@ struct __ecereNameSpace__ecere__sys__OldList templatized; int numParams; unsigned int isInstanceClass; unsigned int byValueSystemClass; -} __attribute__ ((gcc_struct)); +} ecere_gcc_struct; struct __ecereNameSpace__ecere__com__Application { @@ -663,7 +666,7 @@ unsigned int isGUIApp; struct __ecereNameSpace__ecere__sys__OldList allModules; char * parsedCommand; struct __ecereNameSpace__ecere__com__NameSpace systemNameSpace; -} __attribute__ ((gcc_struct)); +} ecere_gcc_struct; static struct __ecereNameSpace__ecere__com__Class * __ecereClass___ecereNameSpace__ecere__sys__LoggingMode; @@ -707,7 +710,7 @@ int importType; int origImportType; struct __ecereNameSpace__ecere__com__NameSpace privateNameSpace; struct __ecereNameSpace__ecere__com__NameSpace publicNameSpace; -} __attribute__ ((gcc_struct)); +} ecere_gcc_struct; void __ecereNameSpace__ecere__sys__Log(const char * text) { diff --git a/compiler/bootstrap/ecere/bootstrap/TempFile.c b/compiler/bootstrap/ecere/bootstrap/TempFile.c index 5c06a5b..ca19e9c 100644 --- a/compiler/bootstrap/ecere/bootstrap/TempFile.c +++ b/compiler/bootstrap/ecere/bootstrap/TempFile.c @@ -38,11 +38,14 @@ typedef unsigned __int64 uint64; #if defined(_WIN32) # if defined(__GNUC__) || defined(__TINYC__) # define ecere_stdcall __attribute__((__stdcall__)) +# define ecere_gcc_struct __attribute__((gcc_struct)) # else # define ecere_stdcall __stdcall +# define ecere_gcc_struct # endif #else # define ecere_stdcall +# define ecere_gcc_struct #endif #include #include @@ -54,7 +57,7 @@ unsigned int position; unsigned int eof; int openMode; unsigned int allocated; -} __attribute__ ((gcc_struct)); +} ecere_gcc_struct; struct __ecereNameSpace__ecere__sys__BTNode; @@ -65,7 +68,7 @@ void * last; int count; unsigned int offset; unsigned int circ; -} __attribute__ ((gcc_struct)); +} ecere_gcc_struct; struct __ecereNameSpace__ecere__com__DataValue { @@ -82,8 +85,8 @@ float f; double d; long long i64; uint64 ui64; -} __attribute__ ((gcc_struct)) __anon1; -} __attribute__ ((gcc_struct)); +} ecere_gcc_struct __anon1; +} ecere_gcc_struct; struct __ecereNameSpace__ecere__com__SerialBuffer { @@ -91,7 +94,7 @@ unsigned char * _buffer; unsigned int count; unsigned int _size; unsigned int pos; -} __attribute__ ((gcc_struct)); +} ecere_gcc_struct; extern void * __ecereNameSpace__ecere__com__eSystem_New(unsigned int size); @@ -122,7 +125,7 @@ struct __ecereNameSpace__ecere__com__Instance void * * _vTbl; struct __ecereNameSpace__ecere__com__Class * _class; int _refCount; -} __attribute__ ((gcc_struct)); +} ecere_gcc_struct; extern long long __ecereNameSpace__ecere__com__eClass_GetProperty(struct __ecereNameSpace__ecere__com__Class * _class, const char * name); @@ -154,7 +157,7 @@ const char * category; unsigned int compiled; unsigned int selfWatchable; unsigned int isWatchable; -} __attribute__ ((gcc_struct)); +} ecere_gcc_struct; extern void __ecereNameSpace__ecere__com__eInstance_FireSelfWatchers(struct __ecereNameSpace__ecere__com__Instance * instance, struct __ecereNameSpace__ecere__com__Property * _property); @@ -182,7 +185,7 @@ struct __ecereNameSpace__ecere__sys__BTNode * root; int count; int (* CompareKey)(struct __ecereNameSpace__ecere__sys__BinaryTree * tree, uintptr_t a, uintptr_t b); void (* FreeKey)(void * key); -} __attribute__ ((gcc_struct)); +} ecere_gcc_struct; struct __ecereNameSpace__ecere__com__DataMember; @@ -206,7 +209,7 @@ struct __ecereNameSpace__ecere__sys__BinaryTree membersAlpha; int memberOffset; short structAlignment; short pointerAlignment; -} __attribute__ ((gcc_struct)); +} ecere_gcc_struct; struct __ecereNameSpace__ecere__com__Method; @@ -218,7 +221,7 @@ struct { const char * dataTypeString; struct __ecereNameSpace__ecere__com__Class * dataTypeClass; -} __attribute__ ((gcc_struct)) __anon1; +} ecere_gcc_struct __anon1; struct __ecereNameSpace__ecere__com__DataValue expression; struct { @@ -228,10 +231,10 @@ union struct __ecereNameSpace__ecere__com__DataMember * member; struct __ecereNameSpace__ecere__com__Property * prop; struct __ecereNameSpace__ecere__com__Method * method; -} __attribute__ ((gcc_struct)) __anon1; -} __attribute__ ((gcc_struct)) __anon2; -} __attribute__ ((gcc_struct)) __anon1; -} __attribute__ ((gcc_struct)); +} ecere_gcc_struct __anon1; +} ecere_gcc_struct __anon2; +} ecere_gcc_struct __anon1; +} ecere_gcc_struct; struct __ecereNameSpace__ecere__com__Method { @@ -248,7 +251,7 @@ void * symbol; const char * dataTypeString; struct __ecereNameSpace__ecere__com__Instance * dataType; int memberAccess; -} __attribute__ ((gcc_struct)); +} ecere_gcc_struct; extern struct __ecereNameSpace__ecere__com__Method * __ecereNameSpace__ecere__com__eClass_AddMethod(struct __ecereNameSpace__ecere__com__Class * _class, const char * name, const char * type, void * function, int declMode); @@ -272,7 +275,7 @@ struct __ecereNameSpace__ecere__sys__BinaryTree nameSpaces; struct __ecereNameSpace__ecere__sys__BinaryTree classes; struct __ecereNameSpace__ecere__sys__BinaryTree defines; struct __ecereNameSpace__ecere__sys__BinaryTree functions; -} __attribute__ ((gcc_struct)); +} ecere_gcc_struct; struct __ecereNameSpace__ecere__com__Class { @@ -331,7 +334,7 @@ struct __ecereNameSpace__ecere__sys__OldList templatized; int numParams; unsigned int isInstanceClass; unsigned int byValueSystemClass; -} __attribute__ ((gcc_struct)); +} ecere_gcc_struct; struct __ecereNameSpace__ecere__com__Application { @@ -342,7 +345,7 @@ unsigned int isGUIApp; struct __ecereNameSpace__ecere__sys__OldList allModules; char * parsedCommand; struct __ecereNameSpace__ecere__com__NameSpace systemNameSpace; -} __attribute__ ((gcc_struct)); +} ecere_gcc_struct; static struct __ecereNameSpace__ecere__com__Class * __ecereClass___ecereNameSpace__ecere__sys__TempFile; @@ -364,7 +367,7 @@ int importType; int origImportType; struct __ecereNameSpace__ecere__com__NameSpace privateNameSpace; struct __ecereNameSpace__ecere__com__NameSpace publicNameSpace; -} __attribute__ ((gcc_struct)); +} ecere_gcc_struct; unsigned int __ecereConstructor___ecereNameSpace__ecere__sys__TempFile(struct __ecereNameSpace__ecere__com__Instance * this) { diff --git a/compiler/bootstrap/ecere/bootstrap/dataTypes.c b/compiler/bootstrap/ecere/bootstrap/dataTypes.c index 9411a28..d36cacd 100644 --- a/compiler/bootstrap/ecere/bootstrap/dataTypes.c +++ b/compiler/bootstrap/ecere/bootstrap/dataTypes.c @@ -38,11 +38,14 @@ typedef unsigned __int64 uint64; #if defined(_WIN32) # if defined(__GNUC__) || defined(__TINYC__) # define ecere_stdcall __attribute__((__stdcall__)) +# define ecere_gcc_struct __attribute__((gcc_struct)) # else # define ecere_stdcall __stdcall +# define ecere_gcc_struct # endif #else # define ecere_stdcall +# define ecere_gcc_struct #endif #include #include @@ -165,7 +168,7 @@ unsigned char * _buffer; unsigned int count; unsigned int _size; unsigned int pos; -} __attribute__ ((gcc_struct)); +} ecere_gcc_struct; extern struct __ecereNameSpace__ecere__com__Property * __ecereProp_float_isInf; @@ -182,7 +185,7 @@ extern struct __ecereNameSpace__ecere__com__Property * __ecereProp_double_isNan; struct __ecereNameSpace__ecere__com__StaticString { char string[1]; -} __attribute__ ((gcc_struct)); +} ecere_gcc_struct; struct __ecereNameSpace__ecere__sys__BTNode; @@ -193,7 +196,7 @@ void * last; int count; unsigned int offset; unsigned int circ; -} __attribute__ ((gcc_struct)); +} ecere_gcc_struct; struct __ecereNameSpace__ecere__com__DataValue { @@ -210,8 +213,8 @@ float f; double d; long long i64; uint64 ui64; -} __attribute__ ((gcc_struct)) __anon1; -} __attribute__ ((gcc_struct)); +} ecere_gcc_struct __anon1; +} ecere_gcc_struct; extern void * __ecereNameSpace__ecere__com__eSystem_New(unsigned int size); @@ -293,7 +296,7 @@ struct __ecereNameSpace__ecere__com__EnumClassData { struct __ecereNameSpace__ecere__sys__OldList values; long long largest; -} __attribute__ ((gcc_struct)); +} ecere_gcc_struct; struct __ecereNameSpace__ecere__com__Property; @@ -310,7 +313,7 @@ struct __ecereNameSpace__ecere__com__Instance void * * _vTbl; struct __ecereNameSpace__ecere__com__Class * _class; int _refCount; -} __attribute__ ((gcc_struct)); +} ecere_gcc_struct; extern long long __ecereNameSpace__ecere__com__eClass_GetProperty(struct __ecereNameSpace__ecere__com__Class * _class, const char * name); @@ -896,7 +899,7 @@ const char * category; unsigned int compiled; unsigned int selfWatchable; unsigned int isWatchable; -} __attribute__ ((gcc_struct)); +} ecere_gcc_struct; extern void __ecereNameSpace__ecere__com__eInstance_FireSelfWatchers(struct __ecereNameSpace__ecere__com__Instance * instance, struct __ecereNameSpace__ecere__com__Property * _property); @@ -954,7 +957,7 @@ struct __ecereNameSpace__ecere__sys__NamedLink64 * prev; struct __ecereNameSpace__ecere__sys__NamedLink64 * next; char * name; long long data; -} __attribute__ ((gcc_struct)); +} ecere_gcc_struct; struct __ecereNameSpace__ecere__sys__BinaryTree; @@ -964,7 +967,7 @@ struct __ecereNameSpace__ecere__sys__BTNode * root; int count; int (* CompareKey)(struct __ecereNameSpace__ecere__sys__BinaryTree * tree, uintptr_t a, uintptr_t b); void (* FreeKey)(void * key); -} __attribute__ ((gcc_struct)); +} ecere_gcc_struct; struct __ecereNameSpace__ecere__com__DataMember; @@ -988,7 +991,7 @@ struct __ecereNameSpace__ecere__sys__BinaryTree membersAlpha; int memberOffset; short structAlignment; short pointerAlignment; -} __attribute__ ((gcc_struct)); +} ecere_gcc_struct; extern void __ecereNameSpace__ecere__com__eClass_FindNextMember(struct __ecereNameSpace__ecere__com__Class * _class, struct __ecereNameSpace__ecere__com__Class ** curClass, struct __ecereNameSpace__ecere__com__DataMember ** curMember, struct __ecereNameSpace__ecere__com__DataMember ** subMemberStack, int * subMemberStackPos); @@ -1004,7 +1007,7 @@ struct { const char * dataTypeString; struct __ecereNameSpace__ecere__com__Class * dataTypeClass; -} __attribute__ ((gcc_struct)) __anon1; +} ecere_gcc_struct __anon1; struct __ecereNameSpace__ecere__com__DataValue expression; struct { @@ -1014,10 +1017,10 @@ union struct __ecereNameSpace__ecere__com__DataMember * member; struct __ecereNameSpace__ecere__com__Property * prop; struct __ecereNameSpace__ecere__com__Method * method; -} __attribute__ ((gcc_struct)) __anon1; -} __attribute__ ((gcc_struct)) __anon2; -} __attribute__ ((gcc_struct)) __anon1; -} __attribute__ ((gcc_struct)); +} ecere_gcc_struct __anon1; +} ecere_gcc_struct __anon2; +} ecere_gcc_struct __anon1; +} ecere_gcc_struct; struct __ecereNameSpace__ecere__com__Method { @@ -1034,7 +1037,7 @@ void * symbol; const char * dataTypeString; struct __ecereNameSpace__ecere__com__Instance * dataType; int memberAccess; -} __attribute__ ((gcc_struct)); +} ecere_gcc_struct; extern struct __ecereNameSpace__ecere__com__Method * __ecereNameSpace__ecere__com__eClass_AddMethod(struct __ecereNameSpace__ecere__com__Class * _class, const char * name, const char * type, void * function, int declMode); @@ -1074,7 +1077,7 @@ int type; int size; int pos; uint64 mask; -} __attribute__ ((gcc_struct)); +} ecere_gcc_struct; struct __ecereNameSpace__ecere__com__NameSpace; @@ -1090,7 +1093,7 @@ struct __ecereNameSpace__ecere__sys__BinaryTree nameSpaces; struct __ecereNameSpace__ecere__sys__BinaryTree classes; struct __ecereNameSpace__ecere__sys__BinaryTree defines; struct __ecereNameSpace__ecere__sys__BinaryTree functions; -} __attribute__ ((gcc_struct)); +} ecere_gcc_struct; struct __ecereNameSpace__ecere__com__Class { @@ -1149,7 +1152,7 @@ struct __ecereNameSpace__ecere__sys__OldList templatized; int numParams; unsigned int isInstanceClass; unsigned int byValueSystemClass; -} __attribute__ ((gcc_struct)); +} ecere_gcc_struct; struct __ecereNameSpace__ecere__com__Application { @@ -1160,7 +1163,7 @@ unsigned int isGUIApp; struct __ecereNameSpace__ecere__sys__OldList allModules; char * parsedCommand; struct __ecereNameSpace__ecere__com__NameSpace systemNameSpace; -} __attribute__ ((gcc_struct)); +} ecere_gcc_struct; static struct __ecereNameSpace__ecere__com__Class * __ecereClass___ecereNameSpace__ecere__com__IOChannel; @@ -1523,7 +1526,7 @@ int importType; int origImportType; struct __ecereNameSpace__ecere__com__NameSpace privateNameSpace; struct __ecereNameSpace__ecere__com__NameSpace publicNameSpace; -} __attribute__ ((gcc_struct)); +} ecere_gcc_struct; void __ecereNameSpace__ecere__com__Byte_OnSerialize(struct __ecereNameSpace__ecere__com__Class * _class, unsigned char * data, struct __ecereNameSpace__ecere__com__Instance * channel) { diff --git a/compiler/bootstrap/ecere/bootstrap/ecere.main.c b/compiler/bootstrap/ecere/bootstrap/ecere.main.c index c5c3e95..20d0339 100644 --- a/compiler/bootstrap/ecere/bootstrap/ecere.main.c +++ b/compiler/bootstrap/ecere/bootstrap/ecere.main.c @@ -38,11 +38,14 @@ typedef unsigned __int64 uint64; #if defined(_WIN32) # if defined(__GNUC__) || defined(__TINYC__) # define ecere_stdcall __attribute__((__stdcall__)) +# define ecere_gcc_struct __attribute__((gcc_struct)) # else # define ecere_stdcall __stdcall +# define ecere_gcc_struct # endif #else # define ecere_stdcall +# define ecere_gcc_struct #endif #include #include @@ -261,7 +264,7 @@ void * last; int count; unsigned int offset; unsigned int circ; -} __attribute__ ((gcc_struct)); +} ecere_gcc_struct; struct __ecereNameSpace__ecere__sys__BTNode; @@ -280,8 +283,8 @@ float f; double d; long long i64; uint64 ui64; -} __attribute__ ((gcc_struct)) __anon1; -} __attribute__ ((gcc_struct)); +} ecere_gcc_struct __anon1; +} ecere_gcc_struct; struct __ecereNameSpace__ecere__com__SerialBuffer { @@ -289,7 +292,7 @@ unsigned char * _buffer; unsigned int count; unsigned int _size; unsigned int pos; -} __attribute__ ((gcc_struct)); +} ecere_gcc_struct; extern void * __ecereNameSpace__ecere__com__eSystem_New(unsigned int size); @@ -312,7 +315,7 @@ struct __ecereNameSpace__ecere__com__Instance void * * _vTbl; struct __ecereNameSpace__ecere__com__Class * _class; int _refCount; -} __attribute__ ((gcc_struct)); +} ecere_gcc_struct; extern long long __ecereNameSpace__ecere__com__eClass_GetProperty(struct __ecereNameSpace__ecere__com__Class * _class, const char * name); @@ -408,7 +411,7 @@ const char * category; unsigned int compiled; unsigned int selfWatchable; unsigned int isWatchable; -} __attribute__ ((gcc_struct)); +} ecere_gcc_struct; extern void __ecereNameSpace__ecere__com__eInstance_FireSelfWatchers(struct __ecereNameSpace__ecere__com__Instance * instance, struct __ecereNameSpace__ecere__com__Property * _property); @@ -470,7 +473,7 @@ struct __ecereNameSpace__ecere__sys__BTNode * root; int count; int (* CompareKey)(struct __ecereNameSpace__ecere__sys__BinaryTree * tree, uintptr_t a, uintptr_t b); void (* FreeKey)(void * key); -} __attribute__ ((gcc_struct)); +} ecere_gcc_struct; struct __ecereNameSpace__ecere__com__Method; @@ -489,7 +492,7 @@ void * symbol; const char * dataTypeString; struct __ecereNameSpace__ecere__com__Instance * dataType; int memberAccess; -} __attribute__ ((gcc_struct)); +} ecere_gcc_struct; struct __ecereNameSpace__ecere__com__Module; @@ -1026,7 +1029,7 @@ struct __ecereNameSpace__ecere__sys__BinaryTree nameSpaces; struct __ecereNameSpace__ecere__sys__BinaryTree classes; struct __ecereNameSpace__ecere__sys__BinaryTree defines; struct __ecereNameSpace__ecere__sys__BinaryTree functions; -} __attribute__ ((gcc_struct)); +} ecere_gcc_struct; struct __ecereNameSpace__ecere__com__Application { @@ -1037,7 +1040,7 @@ unsigned int isGUIApp; struct __ecereNameSpace__ecere__sys__OldList allModules; char * parsedCommand; struct __ecereNameSpace__ecere__com__NameSpace systemNameSpace; -} __attribute__ ((gcc_struct)); +} ecere_gcc_struct; struct __ecereNameSpace__ecere__com__Module { @@ -1055,7 +1058,7 @@ int importType; int origImportType; struct __ecereNameSpace__ecere__com__NameSpace privateNameSpace; struct __ecereNameSpace__ecere__com__NameSpace publicNameSpace; -} __attribute__ ((gcc_struct)); +} ecere_gcc_struct; void __ecereRegisterModule_ecere_main(struct __ecereNameSpace__ecere__com__Instance * module) { @@ -1078,7 +1081,7 @@ struct { const char * dataTypeString; struct __ecereNameSpace__ecere__com__Class * dataTypeClass; -} __attribute__ ((gcc_struct)) __anon1; +} ecere_gcc_struct __anon1; struct __ecereNameSpace__ecere__com__DataValue expression; struct { @@ -1088,10 +1091,10 @@ union struct __ecereNameSpace__ecere__com__DataMember * member; struct __ecereNameSpace__ecere__com__Property * prop; struct __ecereNameSpace__ecere__com__Method * method; -} __attribute__ ((gcc_struct)) __anon1; -} __attribute__ ((gcc_struct)) __anon2; -} __attribute__ ((gcc_struct)) __anon1; -} __attribute__ ((gcc_struct)); +} ecere_gcc_struct __anon1; +} ecere_gcc_struct __anon2; +} ecere_gcc_struct __anon1; +} ecere_gcc_struct; struct __ecereNameSpace__ecere__com__DataMember { @@ -1113,7 +1116,7 @@ struct __ecereNameSpace__ecere__sys__BinaryTree membersAlpha; int memberOffset; short structAlignment; short pointerAlignment; -} __attribute__ ((gcc_struct)); +} ecere_gcc_struct; struct __ecereNameSpace__ecere__com__Class { @@ -1172,5 +1175,5 @@ struct __ecereNameSpace__ecere__sys__OldList templatized; int numParams; unsigned int isInstanceClass; unsigned int byValueSystemClass; -} __attribute__ ((gcc_struct)); +} ecere_gcc_struct; diff --git a/compiler/bootstrap/ecere/bootstrap/i18n.c b/compiler/bootstrap/ecere/bootstrap/i18n.c index c94e214..3754dda 100644 --- a/compiler/bootstrap/ecere/bootstrap/i18n.c +++ b/compiler/bootstrap/ecere/bootstrap/i18n.c @@ -38,11 +38,14 @@ typedef unsigned __int64 uint64; #if defined(_WIN32) # if defined(__GNUC__) || defined(__TINYC__) # define ecere_stdcall __attribute__((__stdcall__)) +# define ecere_gcc_struct __attribute__((gcc_struct)) # else # define ecere_stdcall __stdcall +# define ecere_gcc_struct # endif #else # define ecere_stdcall +# define ecere_gcc_struct #endif #include #include @@ -59,7 +62,7 @@ void * last; int count; unsigned int offset; unsigned int circ; -} __attribute__ ((gcc_struct)); +} ecere_gcc_struct; struct __ecereNameSpace__ecere__sys__BTNode; @@ -78,8 +81,8 @@ float f; double d; long long i64; uint64 ui64; -} __attribute__ ((gcc_struct)) __anon1; -} __attribute__ ((gcc_struct)); +} ecere_gcc_struct __anon1; +} ecere_gcc_struct; struct __ecereNameSpace__ecere__com__SerialBuffer { @@ -87,7 +90,7 @@ unsigned char * _buffer; unsigned int count; unsigned int _size; unsigned int pos; -} __attribute__ ((gcc_struct)); +} ecere_gcc_struct; extern void * __ecereNameSpace__ecere__com__eSystem_New(unsigned int size); @@ -103,7 +106,7 @@ struct __ecereNameSpace__ecere__sys__File { void * input; void * output; -} __attribute__ ((gcc_struct)); +} ecere_gcc_struct; extern char * __ecereNameSpace__ecere__sys__GetEnvironment(const char * envName, char * envValue, int max); @@ -130,7 +133,7 @@ struct __ecereNameSpace__ecere__com__Instance void * * _vTbl; struct __ecereNameSpace__ecere__com__Class * _class; int _refCount; -} __attribute__ ((gcc_struct)); +} ecere_gcc_struct; extern long long __ecereNameSpace__ecere__com__eClass_GetProperty(struct __ecereNameSpace__ecere__com__Class * _class, const char * name); @@ -148,13 +151,13 @@ struct __ecereNameSpace__ecere__com__MapIterator { struct __ecereNameSpace__ecere__com__Instance * container; struct __ecereNameSpace__ecere__com__IteratorPointer * pointer; -} __attribute__ ((gcc_struct)); +} ecere_gcc_struct; struct __ecereNameSpace__ecere__com__Iterator { struct __ecereNameSpace__ecere__com__Instance * container; struct __ecereNameSpace__ecere__com__IteratorPointer * pointer; -} __attribute__ ((gcc_struct)); +} ecere_gcc_struct; int __ecereVMethodID___ecereNameSpace__ecere__sys__File_Read; @@ -231,7 +234,7 @@ const char * category; unsigned int compiled; unsigned int selfWatchable; unsigned int isWatchable; -} __attribute__ ((gcc_struct)); +} ecere_gcc_struct; extern void __ecereNameSpace__ecere__com__eInstance_FireSelfWatchers(struct __ecereNameSpace__ecere__com__Instance * instance, struct __ecereNameSpace__ecere__com__Property * _property); @@ -249,7 +252,7 @@ struct __ecereNameSpace__ecere__sys__BTNode * root; int count; int (* CompareKey)(struct __ecereNameSpace__ecere__sys__BinaryTree * tree, uintptr_t a, uintptr_t b); void (* FreeKey)(void * key); -} __attribute__ ((gcc_struct)); +} ecere_gcc_struct; struct __ecereNameSpace__ecere__com__Method; @@ -268,7 +271,7 @@ void * symbol; const char * dataTypeString; struct __ecereNameSpace__ecere__com__Instance * dataType; int memberAccess; -} __attribute__ ((gcc_struct)); +} ecere_gcc_struct; struct __ecereNameSpace__ecere__com__Module; @@ -288,7 +291,7 @@ struct __ecereNameSpace__ecere__sys__BinaryTree nameSpaces; struct __ecereNameSpace__ecere__sys__BinaryTree classes; struct __ecereNameSpace__ecere__sys__BinaryTree defines; struct __ecereNameSpace__ecere__sys__BinaryTree functions; -} __attribute__ ((gcc_struct)); +} ecere_gcc_struct; struct __ecereNameSpace__ecere__com__Application { @@ -299,7 +302,7 @@ unsigned int isGUIApp; struct __ecereNameSpace__ecere__sys__OldList allModules; char * parsedCommand; struct __ecereNameSpace__ecere__com__NameSpace systemNameSpace; -} __attribute__ ((gcc_struct)); +} ecere_gcc_struct; struct __ecereNameSpace__ecere__com__Module { @@ -317,7 +320,7 @@ int importType; int origImportType; struct __ecereNameSpace__ecere__com__NameSpace privateNameSpace; struct __ecereNameSpace__ecere__com__NameSpace publicNameSpace; -} __attribute__ ((gcc_struct)); +} ecere_gcc_struct; void __ecereUnregisterModule_i18n(struct __ecereNameSpace__ecere__com__Instance * module) { @@ -334,7 +337,7 @@ struct { const char * dataTypeString; struct __ecereNameSpace__ecere__com__Class * dataTypeClass; -} __attribute__ ((gcc_struct)) __anon1; +} ecere_gcc_struct __anon1; struct __ecereNameSpace__ecere__com__DataValue expression; struct { @@ -344,10 +347,10 @@ union struct __ecereNameSpace__ecere__com__DataMember * member; struct __ecereNameSpace__ecere__com__Property * prop; struct __ecereNameSpace__ecere__com__Method * method; -} __attribute__ ((gcc_struct)) __anon1; -} __attribute__ ((gcc_struct)) __anon2; -} __attribute__ ((gcc_struct)) __anon1; -} __attribute__ ((gcc_struct)); +} ecere_gcc_struct __anon1; +} ecere_gcc_struct __anon2; +} ecere_gcc_struct __anon1; +} ecere_gcc_struct; struct __ecereNameSpace__ecere__com__DataMember { @@ -369,7 +372,7 @@ struct __ecereNameSpace__ecere__sys__BinaryTree membersAlpha; int memberOffset; short structAlignment; short pointerAlignment; -} __attribute__ ((gcc_struct)); +} ecere_gcc_struct; struct __ecereNameSpace__ecere__com__Class { @@ -428,7 +431,7 @@ struct __ecereNameSpace__ecere__sys__OldList templatized; int numParams; unsigned int isInstanceClass; unsigned int byValueSystemClass; -} __attribute__ ((gcc_struct)); +} ecere_gcc_struct; extern struct __ecereNameSpace__ecere__com__Class * __ecereClass___ecereNameSpace__ecere__com__Map_TPL_String__ecere__com__Map_TPL_String__const_String___; diff --git a/compiler/bootstrap/ecere/bootstrap/instance.c b/compiler/bootstrap/ecere/bootstrap/instance.c index b89f085..39e2ced 100644 --- a/compiler/bootstrap/ecere/bootstrap/instance.c +++ b/compiler/bootstrap/ecere/bootstrap/instance.c @@ -38,11 +38,14 @@ typedef unsigned __int64 uint64; #if defined(_WIN32) # if defined(__GNUC__) || defined(__TINYC__) # define ecere_stdcall __attribute__((__stdcall__)) +# define ecere_gcc_struct __attribute__((gcc_struct)) # else # define ecere_stdcall __stdcall +# define ecere_gcc_struct # endif #else # define ecere_stdcall +# define ecere_gcc_struct #endif #include #include @@ -148,8 +151,8 @@ float f; double d; long long i64; uint64 ui64; -} __attribute__ ((gcc_struct)) __anon1; -} __attribute__ ((gcc_struct)); +} ecere_gcc_struct __anon1; +} ecere_gcc_struct; static unsigned int __ecereNameSpace__ecere__com__TOTAL_MEM = 0; @@ -579,7 +582,7 @@ void * last; int count; unsigned int offset; unsigned int circ; -} __attribute__ ((gcc_struct)); +} ecere_gcc_struct; struct __ecereNameSpace__ecere__com__SerialBuffer { @@ -587,7 +590,7 @@ unsigned char * _buffer; unsigned int count; unsigned int _size; unsigned int pos; -} __attribute__ ((gcc_struct)); +} ecere_gcc_struct; extern void * memset(void * area, int value, size_t count); @@ -813,7 +816,7 @@ struct __ecereNameSpace__ecere__com__EnumClassData { struct __ecereNameSpace__ecere__sys__OldList values; long long largest; -} __attribute__ ((gcc_struct)); +} ecere_gcc_struct; void __ecereMethod___ecereNameSpace__ecere__sys__OldList_Delete(struct __ecereNameSpace__ecere__sys__OldList * this, void * item); @@ -1044,7 +1047,7 @@ struct __ecereNameSpace__ecere__com__Instance void * * _vTbl; struct __ecereNameSpace__ecere__com__Class * _class; int _refCount; -} __attribute__ ((gcc_struct)); +} ecere_gcc_struct; void * __ecereNameSpace__ecere__com__eInstance_New(struct __ecereNameSpace__ecere__com__Class * _class); @@ -1053,7 +1056,7 @@ struct __ecereNameSpace__ecere__com__DesignerBase struct __ecereNameSpace__ecere__com__Instance * classDesigner; const char * objectClass; unsigned int isDragging; -} __attribute__ ((gcc_struct)); +} ecere_gcc_struct; int __ecereVMethodID___ecereNameSpace__ecere__com__ClassDesignerBase_Reset; @@ -1113,7 +1116,7 @@ const char * name; struct __ecereNameSpace__ecere__com__BTNamedLink * parent, * left, * right; int depth; void * data; -} __attribute__ ((gcc_struct)); +} ecere_gcc_struct; struct __ecereNameSpace__ecere__com__SelfWatcher; @@ -1141,7 +1144,7 @@ unsigned int watcherOffset; const char * category; unsigned int compiled; unsigned int selfWatchable, isWatchable; -} __attribute__ ((gcc_struct)); +} ecere_gcc_struct; int __ecereVMethodID___ecereNameSpace__ecere__com__ClassDesignerBase_FixProperty; @@ -1152,7 +1155,7 @@ struct __ecereNameSpace__ecere__com__SelfWatcher struct __ecereNameSpace__ecere__com__SelfWatcher * prev, * next; void (* callback)(void *); struct __ecereNameSpace__ecere__com__Property * _property; -} __attribute__ ((gcc_struct)); +} ecere_gcc_struct; static __attribute__((unused)) struct __ecereNameSpace__ecere__com__Property * __ecereProp___ecereNameSpace__ecere__com__Class_char__PTR_, * __ecerePropM___ecereNameSpace__ecere__com__Class_char__PTR_; @@ -1178,7 +1181,7 @@ int numParts; int numBlocks; unsigned int totalSize; unsigned int usedSpace; -} __attribute__ ((gcc_struct)); +} ecere_gcc_struct; struct __ecereNameSpace__ecere__com__MemPart { @@ -1186,7 +1189,7 @@ void * memory; int blocksUsed; int size; struct __ecereNameSpace__ecere__com__BlockPool * pool; -} __attribute__ ((gcc_struct)); +} ecere_gcc_struct; static struct __ecereNameSpace__ecere__com__BlockPool * __ecereNameSpace__ecere__com__pools; @@ -1195,7 +1198,7 @@ struct __ecereNameSpace__ecere__com__MemBlock struct __ecereNameSpace__ecere__com__MemBlock * prev, * next; struct __ecereNameSpace__ecere__com__MemPart * part; unsigned int size; -} __attribute__ ((gcc_struct)); +} ecere_gcc_struct; unsigned int __ecereMethod___ecereNameSpace__ecere__com__BlockPool_Expand(struct __ecereNameSpace__ecere__com__BlockPool * this, unsigned int numBlocks) { @@ -1575,7 +1578,7 @@ struct __ecereNameSpace__ecere__sys__BTNode * parent; struct __ecereNameSpace__ecere__sys__BTNode * left; struct __ecereNameSpace__ecere__sys__BTNode * right; int depth; -} __attribute__ ((gcc_struct)); +} ecere_gcc_struct; struct __ecereNameSpace__ecere__sys__BTNode * __ecereProp___ecereNameSpace__ecere__sys__BTNode_Get_next(struct __ecereNameSpace__ecere__sys__BTNode * this); @@ -1586,7 +1589,7 @@ struct __ecereNameSpace__ecere__sys__OldLink struct __ecereNameSpace__ecere__sys__OldLink * prev; struct __ecereNameSpace__ecere__sys__OldLink * next; void * data; -} __attribute__ ((gcc_struct)); +} ecere_gcc_struct; struct __ecereNameSpace__ecere__sys__OldLink * __ecereMethod___ecereNameSpace__ecere__sys__OldList_FindLink(struct __ecereNameSpace__ecere__sys__OldList * this, void * data); @@ -1598,7 +1601,7 @@ struct __ecereNameSpace__ecere__sys__NamedLink64 * prev; struct __ecereNameSpace__ecere__sys__NamedLink64 * next; char * name; long long data; -} __attribute__ ((gcc_struct)); +} ecere_gcc_struct; static void __ecereNameSpace__ecere__com__FreeEnumValue(struct __ecereNameSpace__ecere__sys__NamedLink64 * value) { @@ -1620,7 +1623,7 @@ void * symbol; const char * dataTypeString; struct __ecereNameSpace__ecere__com__Instance * dataType; int memberAccess; -} __attribute__ ((gcc_struct)); +} ecere_gcc_struct; struct __ecereNameSpace__ecere__com__ObjectInfo; @@ -1636,7 +1639,7 @@ struct __ecereNameSpace__ecere__sys__OldList instances; struct __ecereNameSpace__ecere__com__Instance * classDefinition; unsigned int modified; void * i18nStrings; -} __attribute__ ((gcc_struct)); +} ecere_gcc_struct; int __ecereVMethodID___ecereNameSpace__ecere__com__DesignerBase_RenameObject; @@ -1696,7 +1699,7 @@ int type; int size; int pos; uint64 mask; -} __attribute__ ((gcc_struct)); +} ecere_gcc_struct; struct __ecereNameSpace__ecere__com__ClassProperty; @@ -1710,7 +1713,7 @@ long long (* Get)(struct __ecereNameSpace__ecere__com__Class *); const char * dataTypeString; struct __ecereNameSpace__ecere__com__Instance * dataType; unsigned int constant; -} __attribute__ ((gcc_struct)); +} ecere_gcc_struct; struct __ecereNameSpace__ecere__com__Watcher; @@ -1719,7 +1722,7 @@ struct __ecereNameSpace__ecere__com__Watcher struct __ecereNameSpace__ecere__com__Watcher * prev, * next; void (* callback)(void *, void *); struct __ecereNameSpace__ecere__com__Instance * object; -} __attribute__ ((gcc_struct)); +} ecere_gcc_struct; void __ecereNameSpace__ecere__com__eInstance_Watch(void * instance, struct __ecereNameSpace__ecere__com__Property * _property, void * object, void (* callback)(void *, void *)) { @@ -1743,7 +1746,7 @@ struct __ecereNameSpace__ecere__com__DefinedExpression * prev, * next; const char * name; const char * value; struct __ecereNameSpace__ecere__com__NameSpace * nameSpace; -} __attribute__ ((gcc_struct)); +} ecere_gcc_struct; struct __ecereNameSpace__ecere__sys__BinaryTree; @@ -1753,7 +1756,7 @@ struct __ecereNameSpace__ecere__sys__BTNode * root; int count; int (* CompareKey)(struct __ecereNameSpace__ecere__sys__BinaryTree * tree, uintptr_t a, uintptr_t b); void (* FreeKey)(void * key); -} __attribute__ ((gcc_struct)); +} ecere_gcc_struct; struct __ecereNameSpace__ecere__com__NameSpace { @@ -1765,7 +1768,7 @@ struct __ecereNameSpace__ecere__sys__BinaryTree nameSpaces; struct __ecereNameSpace__ecere__sys__BinaryTree classes; struct __ecereNameSpace__ecere__sys__BinaryTree defines; struct __ecereNameSpace__ecere__sys__BinaryTree functions; -} __attribute__ ((gcc_struct)); +} ecere_gcc_struct; struct __ecereNameSpace__ecere__sys__BTNode * __ecereProp___ecereNameSpace__ecere__sys__BinaryTree_Get_first(struct __ecereNameSpace__ecere__sys__BinaryTree * this); @@ -1788,7 +1791,7 @@ unsigned int isGUIApp; struct __ecereNameSpace__ecere__sys__OldList allModules; char * parsedCommand; struct __ecereNameSpace__ecere__com__NameSpace systemNameSpace; -} __attribute__ ((gcc_struct)); +} ecere_gcc_struct; static void __ecereNameSpace__ecere__com__NameSpace_Free(struct __ecereNameSpace__ecere__com__NameSpace * parentNameSpace) { @@ -1836,7 +1839,7 @@ int importType; int origImportType; struct __ecereNameSpace__ecere__com__NameSpace privateNameSpace; struct __ecereNameSpace__ecere__com__NameSpace publicNameSpace; -} __attribute__ ((gcc_struct)); +} ecere_gcc_struct; static struct __ecereNameSpace__ecere__com__BTNamedLink * __ecereNameSpace__ecere__com__SearchNameSpace(struct __ecereNameSpace__ecere__com__NameSpace * nameSpace, const char * name, void * listOffset) { @@ -1903,7 +1906,7 @@ struct __ecereNameSpace__ecere__sys__BinaryTree membersAlpha; int memberOffset; short structAlignment; short pointerAlignment; -} __attribute__ ((gcc_struct)); +} ecere_gcc_struct; struct __ecereNameSpace__ecere__com__ClassTemplateArgument { @@ -1913,7 +1916,7 @@ struct { const char * dataTypeString; struct __ecereNameSpace__ecere__com__Class * dataTypeClass; -} __attribute__ ((gcc_struct)) __anon1; +} ecere_gcc_struct __anon1; struct __ecereNameSpace__ecere__com__DataValue expression; struct { @@ -1923,10 +1926,10 @@ union struct __ecereNameSpace__ecere__com__DataMember * member; struct __ecereNameSpace__ecere__com__Property * prop; struct __ecereNameSpace__ecere__com__Method * method; -} __attribute__ ((gcc_struct)) __anon1; -} __attribute__ ((gcc_struct)) __anon2; -} __attribute__ ((gcc_struct)) __anon1; -} __attribute__ ((gcc_struct)); +} ecere_gcc_struct __anon1; +} ecere_gcc_struct __anon2; +} ecere_gcc_struct __anon1; +} ecere_gcc_struct; static void __ecereNameSpace__ecere__com__DataMember_Free(struct __ecereNameSpace__ecere__com__DataMember * parentMember) { @@ -2104,7 +2107,7 @@ struct __ecereNameSpace__ecere__sys__OldList templatized; int numParams; unsigned int isInstanceClass; unsigned int byValueSystemClass; -} __attribute__ ((gcc_struct)); +} ecere_gcc_struct; static struct __ecereNameSpace__ecere__com__Class * __ecereClass___ecereNameSpace__ecere__com__Angle; @@ -3532,7 +3535,7 @@ struct __ecereNameSpace__ecere__com__SubModule struct __ecereNameSpace__ecere__com__SubModule * prev, * next; struct __ecereNameSpace__ecere__com__Instance * module; int importMode; -} __attribute__ ((gcc_struct)); +} ecere_gcc_struct; static struct __ecereNameSpace__ecere__com__BTNamedLink * __ecereNameSpace__ecere__com__SearchModule(struct __ecereNameSpace__ecere__com__Instance * module, const char * name, void * listOffset, unsigned int searchPrivate) { @@ -3616,7 +3619,7 @@ struct __ecereNameSpace__ecere__com__NameSpace * nameSpace; const char * dataTypeString; struct __ecereNameSpace__ecere__com__Instance * dataType; void * symbol; -} __attribute__ ((gcc_struct)); +} ecere_gcc_struct; void __ecereNameSpace__ecere__com__eInstance_Evolve(struct __ecereNameSpace__ecere__com__Instance ** instancePtr, struct __ecereNameSpace__ecere__com__Class * _class) { @@ -3807,10 +3810,10 @@ union { const char * dataTypeString; int memberType; -} __attribute__ ((gcc_struct)) __anon1; +} ecere_gcc_struct __anon1; struct __ecereNameSpace__ecere__com__ClassTemplateArgument defaultArg; void * param; -} __attribute__ ((gcc_struct)); +} ecere_gcc_struct; static void __ecereNameSpace__ecere__com__FreeTemplateArg(struct __ecereNameSpace__ecere__com__Class * template, struct __ecereNameSpace__ecere__com__ClassTemplateParameter * param, int id) { diff --git a/compiler/bootstrap/ecere/bootstrap/memory.c b/compiler/bootstrap/ecere/bootstrap/memory.c index 10a8c07..2075d77 100644 --- a/compiler/bootstrap/ecere/bootstrap/memory.c +++ b/compiler/bootstrap/ecere/bootstrap/memory.c @@ -38,11 +38,14 @@ typedef unsigned __int64 uint64; #if defined(_WIN32) # if defined(__GNUC__) || defined(__TINYC__) # define ecere_stdcall __attribute__((__stdcall__)) +# define ecere_gcc_struct __attribute__((gcc_struct)) # else # define ecere_stdcall __stdcall +# define ecere_gcc_struct # endif #else # define ecere_stdcall +# define ecere_gcc_struct #endif #include #include @@ -71,7 +74,7 @@ void * last; int count; unsigned int offset; unsigned int circ; -} __attribute__ ((gcc_struct)); +} ecere_gcc_struct; struct __ecereNameSpace__ecere__sys__BTNode; @@ -90,8 +93,8 @@ float f; double d; long long i64; uint64 ui64; -} __attribute__ ((gcc_struct)) __anon1; -} __attribute__ ((gcc_struct)); +} ecere_gcc_struct __anon1; +} ecere_gcc_struct; struct __ecereNameSpace__ecere__com__SerialBuffer { @@ -99,7 +102,7 @@ unsigned char * _buffer; unsigned int count; unsigned int _size; unsigned int pos; -} __attribute__ ((gcc_struct)); +} ecere_gcc_struct; extern void * __ecereNameSpace__ecere__com__eSystem_New(unsigned int size); @@ -151,7 +154,7 @@ struct __ecereNameSpace__ecere__com__Instance void * * _vTbl; struct __ecereNameSpace__ecere__com__Class * _class; int _refCount; -} __attribute__ ((gcc_struct)); +} ecere_gcc_struct; extern long long __ecereNameSpace__ecere__com__eClass_GetProperty(struct __ecereNameSpace__ecere__com__Class * _class, const char * name); @@ -187,7 +190,7 @@ const char * category; unsigned int compiled; unsigned int selfWatchable; unsigned int isWatchable; -} __attribute__ ((gcc_struct)); +} ecere_gcc_struct; extern void __ecereNameSpace__ecere__com__eInstance_FireSelfWatchers(struct __ecereNameSpace__ecere__com__Instance * instance, struct __ecereNameSpace__ecere__com__Property * _property); @@ -205,7 +208,7 @@ struct __ecereNameSpace__ecere__sys__BTNode * root; int count; int (* CompareKey)(struct __ecereNameSpace__ecere__sys__BinaryTree * tree, uintptr_t a, uintptr_t b); void (* FreeKey)(void * key); -} __attribute__ ((gcc_struct)); +} ecere_gcc_struct; struct __ecereNameSpace__ecere__com__Method; @@ -224,7 +227,7 @@ void * symbol; const char * dataTypeString; struct __ecereNameSpace__ecere__com__Instance * dataType; int memberAccess; -} __attribute__ ((gcc_struct)); +} ecere_gcc_struct; struct __ecereNameSpace__ecere__com__Module; @@ -244,7 +247,7 @@ struct __ecereNameSpace__ecere__sys__BinaryTree nameSpaces; struct __ecereNameSpace__ecere__sys__BinaryTree classes; struct __ecereNameSpace__ecere__sys__BinaryTree defines; struct __ecereNameSpace__ecere__sys__BinaryTree functions; -} __attribute__ ((gcc_struct)); +} ecere_gcc_struct; struct __ecereNameSpace__ecere__com__Application { @@ -255,7 +258,7 @@ unsigned int isGUIApp; struct __ecereNameSpace__ecere__sys__OldList allModules; char * parsedCommand; struct __ecereNameSpace__ecere__com__NameSpace systemNameSpace; -} __attribute__ ((gcc_struct)); +} ecere_gcc_struct; struct __ecereNameSpace__ecere__com__Module { @@ -273,7 +276,7 @@ int importType; int origImportType; struct __ecereNameSpace__ecere__com__NameSpace privateNameSpace; struct __ecereNameSpace__ecere__com__NameSpace publicNameSpace; -} __attribute__ ((gcc_struct)); +} ecere_gcc_struct; void __ecereRegisterModule_memory(struct __ecereNameSpace__ecere__com__Instance * module) { @@ -303,7 +306,7 @@ struct { const char * dataTypeString; struct __ecereNameSpace__ecere__com__Class * dataTypeClass; -} __attribute__ ((gcc_struct)) __anon1; +} ecere_gcc_struct __anon1; struct __ecereNameSpace__ecere__com__DataValue expression; struct { @@ -313,10 +316,10 @@ union struct __ecereNameSpace__ecere__com__DataMember * member; struct __ecereNameSpace__ecere__com__Property * prop; struct __ecereNameSpace__ecere__com__Method * method; -} __attribute__ ((gcc_struct)) __anon1; -} __attribute__ ((gcc_struct)) __anon2; -} __attribute__ ((gcc_struct)) __anon1; -} __attribute__ ((gcc_struct)); +} ecere_gcc_struct __anon1; +} ecere_gcc_struct __anon2; +} ecere_gcc_struct __anon1; +} ecere_gcc_struct; struct __ecereNameSpace__ecere__com__DataMember { @@ -338,7 +341,7 @@ struct __ecereNameSpace__ecere__sys__BinaryTree membersAlpha; int memberOffset; short structAlignment; short pointerAlignment; -} __attribute__ ((gcc_struct)); +} ecere_gcc_struct; struct __ecereNameSpace__ecere__com__Class { @@ -397,5 +400,5 @@ struct __ecereNameSpace__ecere__sys__OldList templatized; int numParams; unsigned int isInstanceClass; unsigned int byValueSystemClass; -} __attribute__ ((gcc_struct)); +} ecere_gcc_struct; diff --git a/compiler/bootstrap/ecp/bootstrap/ecp.c b/compiler/bootstrap/ecp/bootstrap/ecp.c index 86ff1b8..1a76209 100644 --- a/compiler/bootstrap/ecp/bootstrap/ecp.c +++ b/compiler/bootstrap/ecp/bootstrap/ecp.c @@ -38,11 +38,14 @@ typedef unsigned __int64 uint64; #if defined(_WIN32) # if defined(__GNUC__) || defined(__TINYC__) # define ecere_stdcall __attribute__((__stdcall__)) +# define ecere_gcc_struct __attribute__((gcc_struct)) # else # define ecere_stdcall __stdcall +# define ecere_gcc_struct # endif #else # define ecere_stdcall +# define ecere_gcc_struct #endif #include #include @@ -66,7 +69,7 @@ void * last; int count; unsigned int offset; unsigned int circ; -} __attribute__ ((gcc_struct)); +} ecere_gcc_struct; struct __ecereNameSpace__ecere__com__DataValue { @@ -83,8 +86,8 @@ float f; double d; long long i64; uint64 ui64; -} __attribute__ ((gcc_struct)) __anon1; -} __attribute__ ((gcc_struct)); +} ecere_gcc_struct __anon1; +} ecere_gcc_struct; struct __ecereNameSpace__ecere__com__SerialBuffer { @@ -92,7 +95,7 @@ unsigned char * _buffer; unsigned int count; unsigned int _size; unsigned int pos; -} __attribute__ ((gcc_struct)); +} ecere_gcc_struct; extern void * __ecereNameSpace__ecere__com__eSystem_New(unsigned int size); @@ -130,7 +133,7 @@ int line; int charPos; int pos; int included; -} __attribute__ ((gcc_struct)); +} ecere_gcc_struct; struct ModuleImport; @@ -159,7 +162,7 @@ struct __ecereNameSpace__ecere__com__LinkList void * first; void * last; int count; -} __attribute__ ((gcc_struct)); +} ecere_gcc_struct; extern void SetCurrentNameSpace(const char * s); @@ -233,7 +236,7 @@ struct __ecereNameSpace__ecere__com__EnumClassData { struct __ecereNameSpace__ecere__sys__OldList values; long long largest; -} __attribute__ ((gcc_struct)); +} ecere_gcc_struct; extern void SetExcludedSymbols(struct __ecereNameSpace__ecere__sys__OldList * list); @@ -255,7 +258,7 @@ struct Location { struct CodePosition start; struct CodePosition end; -} __attribute__ ((gcc_struct)); +} ecere_gcc_struct; extern void SetMainModule(struct ModuleImport * moduleImport); @@ -280,7 +283,7 @@ unsigned int isWatchable; unsigned int fixed; unsigned int isStatic; unsigned int noExpansion; -} __attribute__ ((gcc_struct)); +} ecere_gcc_struct; struct FunctionDefine { @@ -289,7 +292,7 @@ struct Definition * next; char * name; int type; char * dataType; -} __attribute__ ((gcc_struct)); +} ecere_gcc_struct; struct DataDefine { @@ -298,7 +301,7 @@ struct Definition * next; char * name; int type; char * dataType; -} __attribute__ ((gcc_struct)); +} ecere_gcc_struct; struct Definition { @@ -306,7 +309,7 @@ struct Definition * prev; struct Definition * next; char * name; int type; -} __attribute__ ((gcc_struct)); +} ecere_gcc_struct; extern void FreeModuleDefine(struct Definition * def); @@ -325,7 +328,7 @@ char * name; int memberAccess; char * type; unsigned int isVirtual; -} __attribute__ ((gcc_struct)); +} ecere_gcc_struct; void FreeMethodDefine(struct MethodDefine * method) { @@ -345,7 +348,7 @@ unsigned int isWatchable; int memberAccess; unsigned int isVirtual; unsigned int hasSet, hasGet; -} __attribute__ ((gcc_struct)); +} ecere_gcc_struct; struct __ecereNameSpace__ecere__com__Class; @@ -354,7 +357,7 @@ struct __ecereNameSpace__ecere__com__Instance void * * _vTbl; struct __ecereNameSpace__ecere__com__Class * _class; int _refCount; -} __attribute__ ((gcc_struct)); +} ecere_gcc_struct; extern long long __ecereNameSpace__ecere__com__eClass_GetProperty(struct __ecereNameSpace__ecere__com__Class * _class, const char * name); @@ -412,7 +415,7 @@ struct TemplateDatatype { struct __ecereNameSpace__ecere__sys__OldList * specifiers; struct Declarator * decl; -} __attribute__ ((gcc_struct)); +} ecere_gcc_struct; struct Expression; @@ -423,7 +426,7 @@ struct Definition * next; char * name; int type; struct Expression * exp; -} __attribute__ ((gcc_struct)); +} ecere_gcc_struct; extern void ProcessExpressionType(struct Expression * exp); @@ -463,7 +466,7 @@ const char * category; unsigned int compiled; unsigned int selfWatchable; unsigned int isWatchable; -} __attribute__ ((gcc_struct)); +} ecere_gcc_struct; extern struct Type * ProcessType(struct __ecereNameSpace__ecere__sys__OldList * specs, struct Declarator * decl); @@ -493,7 +496,7 @@ struct __ecereNameSpace__ecere__sys__NamedLink64 * prev; struct __ecereNameSpace__ecere__sys__NamedLink64 * next; char * name; long long data; -} __attribute__ ((gcc_struct)); +} ecere_gcc_struct; struct Symbol; @@ -511,7 +514,7 @@ int importType; unsigned int globalInstance; unsigned int dllOnly; int importAccess; -} __attribute__ ((gcc_struct)); +} ecere_gcc_struct; struct __ecereNameSpace__ecere__com__NameSpace; @@ -535,7 +538,7 @@ struct __ecereNameSpace__ecere__sys__BTNode * root; int count; int (* CompareKey)(struct __ecereNameSpace__ecere__sys__BinaryTree * tree, uintptr_t a, uintptr_t b); void (* FreeKey)(void * key); -} __attribute__ ((gcc_struct)); +} ecere_gcc_struct; struct __ecereNameSpace__ecere__com__NameSpace { @@ -549,7 +552,7 @@ struct __ecereNameSpace__ecere__sys__BinaryTree nameSpaces; struct __ecereNameSpace__ecere__sys__BinaryTree classes; struct __ecereNameSpace__ecere__sys__BinaryTree defines; struct __ecereNameSpace__ecere__sys__BinaryTree functions; -} __attribute__ ((gcc_struct)); +} ecere_gcc_struct; struct __ecereNameSpace__ecere__com__DataMember { @@ -571,7 +574,7 @@ struct __ecereNameSpace__ecere__sys__BinaryTree membersAlpha; int memberOffset; short structAlignment; short pointerAlignment; -} __attribute__ ((gcc_struct)); +} ecere_gcc_struct; unsigned int __ecereMethod___ecereNameSpace__ecere__sys__BinaryTree_Add(struct __ecereNameSpace__ecere__sys__BinaryTree * this, struct __ecereNameSpace__ecere__sys__BTNode * node); @@ -586,7 +589,7 @@ unsigned int isGUIApp; struct __ecereNameSpace__ecere__sys__OldList allModules; char * parsedCommand; struct __ecereNameSpace__ecere__com__NameSpace systemNameSpace; -} __attribute__ ((gcc_struct)); +} ecere_gcc_struct; static struct __ecereNameSpace__ecere__com__NameSpace globalData; @@ -607,7 +610,7 @@ struct __ecereNameSpace__ecere__sys__OldList classProperties; int memberAccess; int memberType; int size, bitPos; -} __attribute__ ((gcc_struct)); +} ecere_gcc_struct; void FreeDataMemberDefine(struct DataMemberDefine * dataMember) { @@ -662,7 +665,7 @@ int type; int size; int pos; uint64 mask; -} __attribute__ ((gcc_struct)); +} ecere_gcc_struct; struct __ecereNameSpace__ecere__com__ClassProperty; @@ -680,7 +683,7 @@ long long (* Get)(struct __ecereNameSpace__ecere__com__Class *); const char * dataTypeString; struct Type * dataType; unsigned int constant; -} __attribute__ ((gcc_struct)); +} ecere_gcc_struct; struct __ecereNameSpace__ecere__com__Method; @@ -692,7 +695,7 @@ struct { const char * dataTypeString; struct __ecereNameSpace__ecere__com__Class * dataTypeClass; -} __attribute__ ((gcc_struct)) __anon1; +} ecere_gcc_struct __anon1; struct __ecereNameSpace__ecere__com__DataValue expression; struct { @@ -702,10 +705,10 @@ union struct __ecereNameSpace__ecere__com__DataMember * member; struct __ecereNameSpace__ecere__com__Property * prop; struct __ecereNameSpace__ecere__com__Method * method; -} __attribute__ ((gcc_struct)) __anon1; -} __attribute__ ((gcc_struct)) __anon2; -} __attribute__ ((gcc_struct)) __anon1; -} __attribute__ ((gcc_struct)); +} ecere_gcc_struct __anon1; +} ecere_gcc_struct __anon2; +} ecere_gcc_struct __anon1; +} ecere_gcc_struct; struct __ecereNameSpace__ecere__com__Method { @@ -722,7 +725,7 @@ void * symbol; const char * dataTypeString; struct Type * dataType; int memberAccess; -} __attribute__ ((gcc_struct)); +} ecere_gcc_struct; extern struct __ecereNameSpace__ecere__com__Method * __ecereNameSpace__ecere__com__eClass_AddVirtualMethod(struct __ecereNameSpace__ecere__com__Class * _class, const char * name, const char * type, void * function, int declMode); @@ -746,7 +749,7 @@ int importType; int origImportType; struct __ecereNameSpace__ecere__com__NameSpace privateNameSpace; struct __ecereNameSpace__ecere__com__NameSpace publicNameSpace; -} __attribute__ ((gcc_struct)); +} ecere_gcc_struct; struct __ecereNameSpace__ecere__com__Class { @@ -805,7 +808,7 @@ struct __ecereNameSpace__ecere__sys__OldList templatized; int numParams; unsigned int isInstanceClass; unsigned int byValueSystemClass; -} __attribute__ ((gcc_struct)); +} ecere_gcc_struct; static struct __ecereNameSpace__ecere__com__Instance * privateModule; @@ -997,7 +1000,7 @@ struct InitDeclarator * next; struct Location loc; struct Declarator * declarator; struct Initializer * initializer; -} __attribute__ ((gcc_struct)); +} ecere_gcc_struct; struct Operand; @@ -1038,7 +1041,7 @@ unsigned int (* Sma)(struct Expression *, struct Operand *, struct Operand *); unsigned int (* GrtEqu)(struct Expression *, struct Operand *, struct Operand *); unsigned int (* SmaEqu)(struct Expression *, struct Operand *, struct Operand *); unsigned int (* Cond)(struct Expression *, struct Operand *, struct Operand *, struct Operand *); -} __attribute__ ((gcc_struct)); +} ecere_gcc_struct; struct Operand { @@ -1057,9 +1060,9 @@ float f; double d; long long i64; uint64 ui64; -} __attribute__ ((gcc_struct)) __anon1; +} ecere_gcc_struct __anon1; struct OpTable ops; -} __attribute__ ((gcc_struct)); +} ecere_gcc_struct; extern struct Operand GetOperand(struct Expression * exp); @@ -1087,7 +1090,7 @@ unsigned int isDestructor; unsigned int dontMangle; int id; int idCode; -} __attribute__ ((gcc_struct)); +} ecere_gcc_struct; struct ClassDefinition; @@ -1104,7 +1107,7 @@ struct __ecereNameSpace__ecere__sys__BinaryTree templateTypes; struct ClassDefinition * classDef; unsigned int templateTypesOnly; unsigned int hasNameSpace; -} __attribute__ ((gcc_struct)); +} ecere_gcc_struct; struct FunctionDefinition; @@ -1124,7 +1127,7 @@ struct Type * type; struct Symbol * propSet; int tempCount; unsigned int propertyNoThis; -} __attribute__ ((gcc_struct)); +} ecere_gcc_struct; struct External; @@ -1141,7 +1144,7 @@ union struct __ecereNameSpace__ecere__com__Method * method; struct __ecereNameSpace__ecere__com__Property * _property; struct __ecereNameSpace__ecere__com__Class * registered; -} __attribute__ ((gcc_struct)) __anon1; +} ecere_gcc_struct __anon1; unsigned int notYetDeclared; union { @@ -1149,20 +1152,20 @@ struct { struct External * pointerExternal; struct External * structExternal; -} __attribute__ ((gcc_struct)) __anon1; +} ecere_gcc_struct __anon1; struct { struct External * externalGet; struct External * externalSet; struct External * externalPtr; struct External * externalIsSet; -} __attribute__ ((gcc_struct)) __anon2; +} ecere_gcc_struct __anon2; struct { struct External * methodExternal; struct External * methodCodeExternal; -} __attribute__ ((gcc_struct)) __anon3; -} __attribute__ ((gcc_struct)) __anon2; +} ecere_gcc_struct __anon3; +} ecere_gcc_struct __anon2; unsigned int imported; unsigned int declaredStructSym; struct __ecereNameSpace__ecere__com__Class * _class; @@ -1190,7 +1193,7 @@ struct Context * ctx; int isIterator; struct Expression * propCategory; unsigned int mustRegister; -} __attribute__ ((gcc_struct)); +} ecere_gcc_struct; struct __ecereNameSpace__ecere__sys__OldList _excludedSymbols = { @@ -1211,7 +1214,7 @@ struct { struct __ecereNameSpace__ecere__sys__OldList members; char * enumName; -} __attribute__ ((gcc_struct)) __anon1; +} ecere_gcc_struct __anon1; struct { struct Type * returnType; @@ -1219,13 +1222,13 @@ struct __ecereNameSpace__ecere__sys__OldList params; struct Symbol * thisClass; unsigned int staticMethod; struct TemplateParameter * thisClassTemplate; -} __attribute__ ((gcc_struct)) __anon2; +} ecere_gcc_struct __anon2; struct { struct __ecereNameSpace__ecere__com__Method * method; struct __ecereNameSpace__ecere__com__Class * methodClass; struct __ecereNameSpace__ecere__com__Class * usedClass; -} __attribute__ ((gcc_struct)) __anon3; +} ecere_gcc_struct __anon3; struct { struct Type * arrayType; @@ -1233,10 +1236,10 @@ int arraySize; struct Expression * arraySizeExp; unsigned int freeExp; struct Symbol * enumClass; -} __attribute__ ((gcc_struct)) __anon4; +} ecere_gcc_struct __anon4; struct Type * type; struct TemplateParameter * templateParameter; -} __attribute__ ((gcc_struct)) __anon1; +} ecere_gcc_struct __anon1; int kind; unsigned int size; char * name; @@ -1263,7 +1266,7 @@ unsigned int typedByReference : 1; unsigned int casted : 1; unsigned int pointerAlignment : 1; unsigned int isLong : 1; -} __attribute__ ((gcc_struct)); +} ecere_gcc_struct; struct __ecereNameSpace__ecere__com__ClassTemplateParameter; @@ -1279,10 +1282,10 @@ union { const char * dataTypeString; int memberType; -} __attribute__ ((gcc_struct)) __anon1; +} ecere_gcc_struct __anon1; struct __ecereNameSpace__ecere__com__ClassTemplateArgument defaultArg; void * param; -} __attribute__ ((gcc_struct)); +} ecere_gcc_struct; void __ecereMethod_PrecompApp_Main(struct __ecereNameSpace__ecere__com__Instance * this); @@ -1304,26 +1307,26 @@ struct struct Expression * exp; struct Expression * posExp; struct Attrib * attrib; -} __attribute__ ((gcc_struct)) structDecl; +} ecere_gcc_struct structDecl; struct { struct Expression * exp; struct Specifier * enumClass; -} __attribute__ ((gcc_struct)) array; +} ecere_gcc_struct array; struct { struct __ecereNameSpace__ecere__sys__OldList * parameters; -} __attribute__ ((gcc_struct)) function; +} ecere_gcc_struct function; struct { struct __ecereNameSpace__ecere__com__Instance * pointer; -} __attribute__ ((gcc_struct)) pointer; +} ecere_gcc_struct pointer; struct { struct ExtDecl * extended; -} __attribute__ ((gcc_struct)) extended; -} __attribute__ ((gcc_struct)) __anon1; -} __attribute__ ((gcc_struct)); +} ecere_gcc_struct extended; +} ecere_gcc_struct __anon1; +} ecere_gcc_struct; struct Identifier { @@ -1334,7 +1337,7 @@ struct Symbol * classSym; struct Specifier * _class; char * string; struct Identifier * badID; -} __attribute__ ((gcc_struct)); +} ecere_gcc_struct; struct Expression { @@ -1348,7 +1351,7 @@ struct { char * constant; struct Identifier * identifier; -} __attribute__ ((gcc_struct)) __anon1; +} ecere_gcc_struct __anon1; struct Statement * compound; struct Instantiation * instance; struct @@ -1356,86 +1359,86 @@ struct char * string; unsigned int intlString; unsigned int wideString; -} __attribute__ ((gcc_struct)) __anon2; +} ecere_gcc_struct __anon2; struct __ecereNameSpace__ecere__sys__OldList * list; struct { struct __ecereNameSpace__ecere__sys__OldList * specifiers; struct Declarator * decl; -} __attribute__ ((gcc_struct)) _classExp; +} ecere_gcc_struct _classExp; struct { struct Identifier * id; -} __attribute__ ((gcc_struct)) classData; +} ecere_gcc_struct classData; struct { struct Expression * exp; struct __ecereNameSpace__ecere__sys__OldList * arguments; struct Location argLoc; -} __attribute__ ((gcc_struct)) call; +} ecere_gcc_struct call; struct { struct Expression * exp; struct __ecereNameSpace__ecere__sys__OldList * index; -} __attribute__ ((gcc_struct)) index; +} ecere_gcc_struct index; struct { struct Expression * exp; struct Identifier * member; int memberType; unsigned int thisPtr; -} __attribute__ ((gcc_struct)) member; +} ecere_gcc_struct member; struct { int op; struct Expression * exp1; struct Expression * exp2; -} __attribute__ ((gcc_struct)) op; +} ecere_gcc_struct op; struct TypeName * typeName; struct Specifier * _class; struct { struct TypeName * typeName; struct Expression * exp; -} __attribute__ ((gcc_struct)) cast; +} ecere_gcc_struct cast; struct { struct Expression * cond; struct __ecereNameSpace__ecere__sys__OldList * exp; struct Expression * elseExp; -} __attribute__ ((gcc_struct)) cond; +} ecere_gcc_struct cond; struct { struct TypeName * typeName; struct Expression * size; -} __attribute__ ((gcc_struct)) _new; +} ecere_gcc_struct _new; struct { struct TypeName * typeName; struct Expression * size; struct Expression * exp; -} __attribute__ ((gcc_struct)) _renew; +} ecere_gcc_struct _renew; struct { char * table; struct Identifier * id; -} __attribute__ ((gcc_struct)) db; +} ecere_gcc_struct db; struct { struct Expression * ds; struct Expression * name; -} __attribute__ ((gcc_struct)) dbopen; +} ecere_gcc_struct dbopen; struct { struct TypeName * typeName; struct Initializer * initializer; -} __attribute__ ((gcc_struct)) initializer; +} ecere_gcc_struct initializer; struct { struct Expression * exp; struct TypeName * typeName; -} __attribute__ ((gcc_struct)) vaArg; -} __attribute__ ((gcc_struct)) __anon1; +} ecere_gcc_struct vaArg; +} ecere_gcc_struct __anon1; unsigned int debugValue; struct __ecereNameSpace__ecere__com__DataValue val; uint64 address; @@ -1451,7 +1454,7 @@ unsigned int needCast; unsigned int thisPtr; unsigned int opDestType; unsigned int needTemplateCast; -} __attribute__ ((gcc_struct)); +} ecere_gcc_struct; struct Specifier { @@ -1469,7 +1472,7 @@ char * name; struct Symbol * symbol; struct __ecereNameSpace__ecere__sys__OldList * templateArgs; struct Specifier * nsSpec; -} __attribute__ ((gcc_struct)) __anon1; +} ecere_gcc_struct __anon1; struct { struct Identifier * id; @@ -1479,12 +1482,12 @@ struct __ecereNameSpace__ecere__sys__OldList * definitions; unsigned int addNameSpace; struct Context * ctx; struct ExtDecl * extDeclStruct; -} __attribute__ ((gcc_struct)) __anon2; +} ecere_gcc_struct __anon2; struct Expression * expression; struct Specifier * _class; struct TemplateParameter * templateParameter; -} __attribute__ ((gcc_struct)) __anon1; -} __attribute__ ((gcc_struct)); +} ecere_gcc_struct __anon1; +} ecere_gcc_struct; struct Instantiation { @@ -1501,7 +1504,7 @@ unsigned char * data; struct Location nameLoc; struct Location insideLoc; unsigned int built; -} __attribute__ ((gcc_struct)); +} ecere_gcc_struct; struct ClassDefinition { @@ -1516,7 +1519,7 @@ struct Location blockStart; struct Location nameLoc; int declMode; unsigned int deleteWatchable; -} __attribute__ ((gcc_struct)); +} ecere_gcc_struct; struct PropertyDef; @@ -1538,8 +1541,8 @@ struct unsigned int conversion : 1; unsigned int isWatchable : 1; unsigned int isDBProp : 1; -} __attribute__ ((gcc_struct)) __anon1; -} __attribute__ ((gcc_struct)); +} ecere_gcc_struct __anon1; +} ecere_gcc_struct; struct TemplateArgument; @@ -1554,11 +1557,11 @@ union { struct TemplateDatatype * dataType; int memberType; -} __attribute__ ((gcc_struct)) __anon1; +} ecere_gcc_struct __anon1; struct TemplateArgument * defaultArgument; const char * dataTypeString; struct Type * baseType; -} __attribute__ ((gcc_struct)); +} ecere_gcc_struct; struct TemplateArgument { @@ -1572,8 +1575,8 @@ union struct Expression * expression; struct Identifier * identifier; struct TemplateDatatype * templateDatatype; -} __attribute__ ((gcc_struct)) __anon1; -} __attribute__ ((gcc_struct)); +} ecere_gcc_struct __anon1; +} ecere_gcc_struct; static void OutputSymbols(const char * fileName) { @@ -1799,7 +1802,7 @@ struct Enumerator * next; struct Location loc; struct Identifier * id; struct Expression * exp; -} __attribute__ ((gcc_struct)); +} ecere_gcc_struct; static void ProcessClassEnumValues(int classType, struct __ecereNameSpace__ecere__sys__OldList * definitions, struct Symbol * symbol, struct __ecereNameSpace__ecere__sys__OldList * baseSpecs, struct __ecereNameSpace__ecere__sys__OldList * enumValues) { @@ -1932,7 +1935,7 @@ struct TemplateDatatype * templateDatatype; struct __ecereNameSpace__ecere__com__Instance * dbtableEntry; struct __ecereNameSpace__ecere__com__Instance * dbindexItem; struct DBTableDef * dbtableDef; -} __attribute__ ((gcc_struct)) YYSTYPE; +} ecere_gcc_struct YYSTYPE; extern YYSTYPE yylval; @@ -1955,11 +1958,11 @@ struct { struct Identifier * id; struct Initializer * initializer; -} __attribute__ ((gcc_struct)) __anon1; -} __attribute__ ((gcc_struct)) __anon1; +} ecere_gcc_struct __anon1; +} ecere_gcc_struct __anon1; int memberAccess; void * object; -} __attribute__ ((gcc_struct)); +} ecere_gcc_struct; struct Declaration { @@ -1973,18 +1976,18 @@ struct { struct __ecereNameSpace__ecere__sys__OldList * specifiers; struct __ecereNameSpace__ecere__sys__OldList * declarators; -} __attribute__ ((gcc_struct)) __anon1; +} ecere_gcc_struct __anon1; struct Instantiation * inst; struct { struct Identifier * id; struct Expression * exp; -} __attribute__ ((gcc_struct)) __anon2; -} __attribute__ ((gcc_struct)) __anon1; +} ecere_gcc_struct __anon2; +} ecere_gcc_struct __anon1; struct Specifier * extStorage; struct Symbol * symbol; int declMode; -} __attribute__ ((gcc_struct)); +} ecere_gcc_struct; struct External { @@ -2001,13 +2004,13 @@ struct Declaration * declaration; char * importString; struct Identifier * id; struct DBTableDef * table; -} __attribute__ ((gcc_struct)) __anon1; +} ecere_gcc_struct __anon1; int importType; struct External * fwdDecl; struct __ecereNameSpace__ecere__com__Instance * outgoing; struct __ecereNameSpace__ecere__com__Instance * incoming; int nonBreakableIncoming; -} __attribute__ ((gcc_struct)); +} ecere_gcc_struct; static void AddDefinitions(struct ClassDefine * classDefine, struct DataMemberDefine * parentMemberDefine, struct __ecereNameSpace__ecere__com__Class * regClass, struct __ecereNameSpace__ecere__com__DataMember * member, struct __ecereNameSpace__ecere__sys__OldList * definitions) { diff --git a/compiler/bootstrap/ecp/bootstrap/ecp.main.c b/compiler/bootstrap/ecp/bootstrap/ecp.main.c index 4c5ca6e..b0ab407 100644 --- a/compiler/bootstrap/ecp/bootstrap/ecp.main.c +++ b/compiler/bootstrap/ecp/bootstrap/ecp.main.c @@ -38,11 +38,14 @@ typedef unsigned __int64 uint64; #if defined(_WIN32) # if defined(__GNUC__) || defined(__TINYC__) # define ecere_stdcall __attribute__((__stdcall__)) +# define ecere_gcc_struct __attribute__((gcc_struct)) # else # define ecere_stdcall __stdcall +# define ecere_gcc_struct # endif #else # define ecere_stdcall +# define ecere_gcc_struct #endif #include #include @@ -67,7 +70,7 @@ void * last; int count; unsigned int offset; unsigned int circ; -} __attribute__ ((gcc_struct)); +} ecere_gcc_struct; struct __ecereNameSpace__ecere__sys__BTNode; @@ -88,8 +91,8 @@ float f; double d; long long i64; uint64 ui64; -} __attribute__ ((gcc_struct)) __anon1; -} __attribute__ ((gcc_struct)); +} ecere_gcc_struct __anon1; +} ecere_gcc_struct; struct __ecereNameSpace__ecere__com__SerialBuffer { @@ -97,7 +100,7 @@ unsigned char * _buffer; unsigned int count; unsigned int _size; unsigned int pos; -} __attribute__ ((gcc_struct)); +} ecere_gcc_struct; extern void * __ecereNameSpace__ecere__com__eSystem_New(unsigned int size); @@ -120,7 +123,7 @@ struct __ecereNameSpace__ecere__com__Instance void * * _vTbl; struct __ecereNameSpace__ecere__com__Class * _class; int _refCount; -} __attribute__ ((gcc_struct)); +} ecere_gcc_struct; extern long long __ecereNameSpace__ecere__com__eClass_GetProperty(struct __ecereNameSpace__ecere__com__Class * _class, const char * name); @@ -178,7 +181,7 @@ const char * category; unsigned int compiled; unsigned int selfWatchable; unsigned int isWatchable; -} __attribute__ ((gcc_struct)); +} ecere_gcc_struct; extern void __ecereNameSpace__ecere__com__eInstance_FireSelfWatchers(struct __ecereNameSpace__ecere__com__Instance * instance, struct __ecereNameSpace__ecere__com__Property * _property); @@ -198,7 +201,7 @@ struct __ecereNameSpace__ecere__sys__BTNode * root; int count; int (* CompareKey)(struct __ecereNameSpace__ecere__sys__BinaryTree * tree, uintptr_t a, uintptr_t b); void (* FreeKey)(void * key); -} __attribute__ ((gcc_struct)); +} ecere_gcc_struct; struct __ecereNameSpace__ecere__com__Method; @@ -217,7 +220,7 @@ void * symbol; const char * dataTypeString; struct Type * dataType; int memberAccess; -} __attribute__ ((gcc_struct)); +} ecere_gcc_struct; struct __ecereNameSpace__ecere__com__Module; @@ -263,7 +266,7 @@ struct __ecereNameSpace__ecere__sys__BinaryTree nameSpaces; struct __ecereNameSpace__ecere__sys__BinaryTree classes; struct __ecereNameSpace__ecere__sys__BinaryTree defines; struct __ecereNameSpace__ecere__sys__BinaryTree functions; -} __attribute__ ((gcc_struct)); +} ecere_gcc_struct; struct __ecereNameSpace__ecere__com__Application { @@ -274,7 +277,7 @@ unsigned int isGUIApp; struct __ecereNameSpace__ecere__sys__OldList allModules; char * parsedCommand; struct __ecereNameSpace__ecere__com__NameSpace systemNameSpace; -} __attribute__ ((gcc_struct)); +} ecere_gcc_struct; struct __ecereNameSpace__ecere__com__Module { @@ -292,7 +295,7 @@ int importType; int origImportType; struct __ecereNameSpace__ecere__com__NameSpace privateNameSpace; struct __ecereNameSpace__ecere__com__NameSpace publicNameSpace; -} __attribute__ ((gcc_struct)); +} ecere_gcc_struct; void __ecereRegisterModule_ecp_main(struct __ecereNameSpace__ecere__com__Instance * module) { @@ -315,7 +318,7 @@ struct { const char * dataTypeString; struct __ecereNameSpace__ecere__com__Class * dataTypeClass; -} __attribute__ ((gcc_struct)) __anon1; +} ecere_gcc_struct __anon1; struct __ecereNameSpace__ecere__com__DataValue expression; struct { @@ -325,10 +328,10 @@ union struct __ecereNameSpace__ecere__com__DataMember * member; struct __ecereNameSpace__ecere__com__Property * prop; struct __ecereNameSpace__ecere__com__Method * method; -} __attribute__ ((gcc_struct)) __anon1; -} __attribute__ ((gcc_struct)) __anon2; -} __attribute__ ((gcc_struct)) __anon1; -} __attribute__ ((gcc_struct)); +} ecere_gcc_struct __anon1; +} ecere_gcc_struct __anon2; +} ecere_gcc_struct __anon1; +} ecere_gcc_struct; struct __ecereNameSpace__ecere__com__DataMember { @@ -350,7 +353,7 @@ struct __ecereNameSpace__ecere__sys__BinaryTree membersAlpha; int memberOffset; short structAlignment; short pointerAlignment; -} __attribute__ ((gcc_struct)); +} ecere_gcc_struct; struct __ecereNameSpace__ecere__com__Class { @@ -409,7 +412,7 @@ struct __ecereNameSpace__ecere__sys__OldList templatized; int numParams; unsigned int isInstanceClass; unsigned int byValueSystemClass; -} __attribute__ ((gcc_struct)); +} ecere_gcc_struct; extern struct __ecereNameSpace__ecere__com__Class * __ecereClass___ecereNameSpace__ecere__com__Instance; diff --git a/compiler/bootstrap/ecs/bootstrap/ecs.c b/compiler/bootstrap/ecs/bootstrap/ecs.c index d41cb2a..3c71166 100644 --- a/compiler/bootstrap/ecs/bootstrap/ecs.c +++ b/compiler/bootstrap/ecs/bootstrap/ecs.c @@ -38,11 +38,14 @@ typedef unsigned __int64 uint64; #if defined(_WIN32) # if defined(__GNUC__) || defined(__TINYC__) # define ecere_stdcall __attribute__((__stdcall__)) +# define ecere_gcc_struct __attribute__((gcc_struct)) # else # define ecere_stdcall __stdcall +# define ecere_gcc_struct # endif #else # define ecere_stdcall +# define ecere_gcc_struct #endif #include #include @@ -88,7 +91,7 @@ void * last; int count; unsigned int offset; unsigned int circ; -} __attribute__ ((gcc_struct)); +} ecere_gcc_struct; struct __ecereNameSpace__ecere__com__DataValue { @@ -105,8 +108,8 @@ float f; double d; long long i64; uint64 ui64; -} __attribute__ ((gcc_struct)) __anon1; -} __attribute__ ((gcc_struct)); +} ecere_gcc_struct __anon1; +} ecere_gcc_struct; struct __ecereNameSpace__ecere__com__SerialBuffer { @@ -114,7 +117,7 @@ unsigned char * _buffer; unsigned int count; unsigned int _size; unsigned int pos; -} __attribute__ ((gcc_struct)); +} ecere_gcc_struct; extern void * __ecereNameSpace__ecere__com__eSystem_New(unsigned int size); @@ -134,7 +137,7 @@ int line; int charPos; int pos; int included; -} __attribute__ ((gcc_struct)); +} ecere_gcc_struct; struct Context; @@ -204,13 +207,13 @@ struct ContextStringPair { char * string; char * context; -} __attribute__ ((gcc_struct)); +} ecere_gcc_struct; struct __ecereNameSpace__ecere__com__CustomAVLTree { struct __ecereNameSpace__ecere__com__AVLNode * root; int count; -} __attribute__ ((gcc_struct)); +} ecere_gcc_struct; extern char * __ecereNameSpace__ecere__sys__PathCat(char * string, const char * addedPath); @@ -256,7 +259,7 @@ struct Location { struct CodePosition start; struct CodePosition end; -} __attribute__ ((gcc_struct)); +} ecere_gcc_struct; extern void FinishTemplatesContext(struct Context * context); @@ -295,7 +298,7 @@ struct __ecereNameSpace__ecere__sys__OldList classes; struct __ecereNameSpace__ecere__sys__OldList functions; int importType; int importAccess; -} __attribute__ ((gcc_struct)); +} ecere_gcc_struct; extern void FreeModuleImport(struct ModuleImport * imp); @@ -306,7 +309,7 @@ struct __ecereNameSpace__ecere__com__Instance void * * _vTbl; struct __ecereNameSpace__ecere__com__Class * _class; int _refCount; -} __attribute__ ((gcc_struct)); +} ecere_gcc_struct; extern long long __ecereNameSpace__ecere__com__eClass_GetProperty(struct __ecereNameSpace__ecere__com__Class * _class, const char * name); @@ -334,13 +337,13 @@ struct __ecereNameSpace__ecere__com__MapIterator { struct __ecereNameSpace__ecere__com__Instance * container; struct __ecereNameSpace__ecere__com__IteratorPointer * pointer; -} __attribute__ ((gcc_struct)); +} ecere_gcc_struct; struct __ecereNameSpace__ecere__com__Iterator { struct __ecereNameSpace__ecere__com__Instance * container; struct __ecereNameSpace__ecere__com__IteratorPointer * pointer; -} __attribute__ ((gcc_struct)); +} ecere_gcc_struct; unsigned int __ecereMethod___ecereNameSpace__ecere__sys__File_GetLine(struct __ecereNameSpace__ecere__com__Instance * this, char * s, int max); @@ -385,7 +388,7 @@ struct ModuleInfo struct ModuleInfo * prev, * next; char * name; unsigned int globalInstance; -} __attribute__ ((gcc_struct)); +} ecere_gcc_struct; struct __ecereNameSpace__ecere__sys__BTNode; @@ -396,7 +399,7 @@ struct __ecereNameSpace__ecere__sys__BTNode * parent; struct __ecereNameSpace__ecere__sys__BTNode * left; struct __ecereNameSpace__ecere__sys__BTNode * right; int depth; -} __attribute__ ((gcc_struct)); +} ecere_gcc_struct; struct __ecereNameSpace__ecere__sys__BTNode * __ecereProp___ecereNameSpace__ecere__sys__BTNode_Get_next(struct __ecereNameSpace__ecere__sys__BTNode * this); @@ -417,7 +420,7 @@ struct FunctionImport struct FunctionImport * prev; struct FunctionImport * next; char * name; -} __attribute__ ((gcc_struct)); +} ecere_gcc_struct; struct MethodImport; @@ -427,7 +430,7 @@ struct MethodImport * prev; struct MethodImport * next; char * name; unsigned int isVirtual; -} __attribute__ ((gcc_struct)); +} ecere_gcc_struct; struct PropertyImport; @@ -439,7 +442,7 @@ char * name; unsigned int isVirtual; unsigned int hasSet; unsigned int hasGet; -} __attribute__ ((gcc_struct)); +} ecere_gcc_struct; struct ImportedModule; @@ -453,7 +456,7 @@ int importType; unsigned int globalInstance; unsigned int dllOnly; int importAccess; -} __attribute__ ((gcc_struct)); +} ecere_gcc_struct; struct Type; @@ -481,7 +484,7 @@ const char * category; unsigned int compiled; unsigned int selfWatchable; unsigned int isWatchable; -} __attribute__ ((gcc_struct)); +} ecere_gcc_struct; extern struct Type * ProcessTypeString(const char * string, unsigned int staticMethod); @@ -499,7 +502,7 @@ struct __ecereNameSpace__ecere__com__BTNamedLink * left; struct __ecereNameSpace__ecere__com__BTNamedLink * right; int depth; void * data; -} __attribute__ ((gcc_struct)); +} ecere_gcc_struct; struct __ecereNameSpace__ecere__sys__OldLink; @@ -508,7 +511,7 @@ struct __ecereNameSpace__ecere__sys__OldLink struct __ecereNameSpace__ecere__sys__OldLink * prev; struct __ecereNameSpace__ecere__sys__OldLink * next; void * data; -} __attribute__ ((gcc_struct)); +} ecere_gcc_struct; struct Symbol; @@ -531,7 +534,7 @@ struct __ecereNameSpace__ecere__sys__OldList methods; struct __ecereNameSpace__ecere__sys__OldList properties; unsigned int itself; int isRemote; -} __attribute__ ((gcc_struct)); +} ecere_gcc_struct; struct __ecereNameSpace__ecere__com__Method; @@ -550,7 +553,7 @@ void * symbol; const char * dataTypeString; struct Type * dataType; int memberAccess; -} __attribute__ ((gcc_struct)); +} ecere_gcc_struct; struct Symbol { @@ -565,7 +568,7 @@ union struct __ecereNameSpace__ecere__com__Method * method; struct __ecereNameSpace__ecere__com__Property * _property; struct __ecereNameSpace__ecere__com__Class * registered; -} __attribute__ ((gcc_struct)) __anon1; +} ecere_gcc_struct __anon1; unsigned int notYetDeclared; union { @@ -573,20 +576,20 @@ struct { struct External * pointerExternal; struct External * structExternal; -} __attribute__ ((gcc_struct)) __anon1; +} ecere_gcc_struct __anon1; struct { struct External * externalGet; struct External * externalSet; struct External * externalPtr; struct External * externalIsSet; -} __attribute__ ((gcc_struct)) __anon2; +} ecere_gcc_struct __anon2; struct { struct External * methodExternal; struct External * methodCodeExternal; -} __attribute__ ((gcc_struct)) __anon3; -} __attribute__ ((gcc_struct)) __anon2; +} ecere_gcc_struct __anon3; +} ecere_gcc_struct __anon2; unsigned int imported; unsigned int declaredStructSym; struct __ecereNameSpace__ecere__com__Class * _class; @@ -614,7 +617,7 @@ struct Context * ctx; int isIterator; struct Expression * propCategory; unsigned int mustRegister; -} __attribute__ ((gcc_struct)); +} ecere_gcc_struct; struct Type { @@ -628,7 +631,7 @@ struct { struct __ecereNameSpace__ecere__sys__OldList members; char * enumName; -} __attribute__ ((gcc_struct)) __anon1; +} ecere_gcc_struct __anon1; struct { struct Type * returnType; @@ -636,13 +639,13 @@ struct __ecereNameSpace__ecere__sys__OldList params; struct Symbol * thisClass; unsigned int staticMethod; struct TemplateParameter * thisClassTemplate; -} __attribute__ ((gcc_struct)) __anon2; +} ecere_gcc_struct __anon2; struct { struct __ecereNameSpace__ecere__com__Method * method; struct __ecereNameSpace__ecere__com__Class * methodClass; struct __ecereNameSpace__ecere__com__Class * usedClass; -} __attribute__ ((gcc_struct)) __anon3; +} ecere_gcc_struct __anon3; struct { struct Type * arrayType; @@ -650,10 +653,10 @@ int arraySize; struct Expression * arraySizeExp; unsigned int freeExp; struct Symbol * enumClass; -} __attribute__ ((gcc_struct)) __anon4; +} ecere_gcc_struct __anon4; struct Type * type; struct TemplateParameter * templateParameter; -} __attribute__ ((gcc_struct)) __anon1; +} ecere_gcc_struct __anon1; int kind; unsigned int size; char * name; @@ -680,7 +683,7 @@ unsigned int typedByReference : 1; unsigned int casted : 1; unsigned int pointerAlignment : 1; unsigned int isLong : 1; -} __attribute__ ((gcc_struct)); +} ecere_gcc_struct; extern void DeclareMethod(struct External * neededFor, struct __ecereNameSpace__ecere__com__Method * method, const char * name); @@ -721,7 +724,7 @@ struct __ecereNameSpace__ecere__sys__BTNode * root; int count; int (* CompareKey)(struct __ecereNameSpace__ecere__sys__BinaryTree * tree, uintptr_t a, uintptr_t b); void (* FreeKey)(void * key); -} __attribute__ ((gcc_struct)); +} ecere_gcc_struct; struct __ecereNameSpace__ecere__com__NameSpace { @@ -735,7 +738,7 @@ struct __ecereNameSpace__ecere__sys__BinaryTree nameSpaces; struct __ecereNameSpace__ecere__sys__BinaryTree classes; struct __ecereNameSpace__ecere__sys__BinaryTree defines; struct __ecereNameSpace__ecere__sys__BinaryTree functions; -} __attribute__ ((gcc_struct)); +} ecere_gcc_struct; struct __ecereNameSpace__ecere__sys__BTNode * __ecereProp___ecereNameSpace__ecere__sys__BinaryTree_Get_first(struct __ecereNameSpace__ecere__sys__BinaryTree * this); @@ -750,7 +753,7 @@ unsigned int isGUIApp; struct __ecereNameSpace__ecere__sys__OldList allModules; char * parsedCommand; struct __ecereNameSpace__ecere__com__NameSpace systemNameSpace; -} __attribute__ ((gcc_struct)); +} ecere_gcc_struct; struct __ecereNameSpace__ecere__com__Module { @@ -768,7 +771,7 @@ int importType; int origImportType; struct __ecereNameSpace__ecere__com__NameSpace privateNameSpace; struct __ecereNameSpace__ecere__com__NameSpace publicNameSpace; -} __attribute__ ((gcc_struct)); +} ecere_gcc_struct; static struct __ecereNameSpace__ecere__com__NameSpace globalData; @@ -789,7 +792,7 @@ struct { const char * dataTypeString; struct __ecereNameSpace__ecere__com__Class * dataTypeClass; -} __attribute__ ((gcc_struct)) __anon1; +} ecere_gcc_struct __anon1; struct __ecereNameSpace__ecere__com__DataValue expression; struct { @@ -799,10 +802,10 @@ union struct __ecereNameSpace__ecere__com__DataMember * member; struct __ecereNameSpace__ecere__com__Property * prop; struct __ecereNameSpace__ecere__com__Method * method; -} __attribute__ ((gcc_struct)) __anon1; -} __attribute__ ((gcc_struct)) __anon2; -} __attribute__ ((gcc_struct)) __anon1; -} __attribute__ ((gcc_struct)); +} ecere_gcc_struct __anon1; +} ecere_gcc_struct __anon2; +} ecere_gcc_struct __anon1; +} ecere_gcc_struct; struct __ecereNameSpace__ecere__com__DataMember { @@ -824,7 +827,7 @@ struct __ecereNameSpace__ecere__sys__BinaryTree membersAlpha; int memberOffset; short structAlignment; short pointerAlignment; -} __attribute__ ((gcc_struct)); +} ecere_gcc_struct; struct __ecereNameSpace__ecere__com__Class { @@ -883,7 +886,7 @@ struct __ecereNameSpace__ecere__sys__OldList templatized; int numParams; unsigned int isInstanceClass; unsigned int byValueSystemClass; -} __attribute__ ((gcc_struct)); +} ecere_gcc_struct; static struct __ecereNameSpace__ecere__com__Class * __ecereClass_ModuleInfo; @@ -1856,7 +1859,7 @@ struct __ecereNameSpace__ecere__com__NameSpace * nameSpace; const char * dataTypeString; struct Type * dataType; void * symbol; -} __attribute__ ((gcc_struct)); +} ecere_gcc_struct; static void WriteMain(const char * fileName) { @@ -2517,7 +2520,7 @@ struct __ecereNameSpace__ecere__com__SubModule * prev; struct __ecereNameSpace__ecere__com__SubModule * next; struct __ecereNameSpace__ecere__com__Instance * module; int importMode; -} __attribute__ ((gcc_struct)); +} ecere_gcc_struct; static struct __ecereNameSpace__ecere__com__Class * SearchAppClass_Module(struct __ecereNameSpace__ecere__com__Instance * module) { diff --git a/compiler/bootstrap/ecs/bootstrap/ecs.main.c b/compiler/bootstrap/ecs/bootstrap/ecs.main.c index ae30b18..7b6818e 100644 --- a/compiler/bootstrap/ecs/bootstrap/ecs.main.c +++ b/compiler/bootstrap/ecs/bootstrap/ecs.main.c @@ -38,11 +38,14 @@ typedef unsigned __int64 uint64; #if defined(_WIN32) # if defined(__GNUC__) || defined(__TINYC__) # define ecere_stdcall __attribute__((__stdcall__)) +# define ecere_gcc_struct __attribute__((gcc_struct)) # else # define ecere_stdcall __stdcall +# define ecere_gcc_struct # endif #else # define ecere_stdcall +# define ecere_gcc_struct #endif #include #include @@ -73,7 +76,7 @@ void * last; int count; unsigned int offset; unsigned int circ; -} __attribute__ ((gcc_struct)); +} ecere_gcc_struct; struct __ecereNameSpace__ecere__sys__BTNode; @@ -94,8 +97,8 @@ float f; double d; long long i64; uint64 ui64; -} __attribute__ ((gcc_struct)) __anon1; -} __attribute__ ((gcc_struct)); +} ecere_gcc_struct __anon1; +} ecere_gcc_struct; struct __ecereNameSpace__ecere__com__SerialBuffer { @@ -103,7 +106,7 @@ unsigned char * _buffer; unsigned int count; unsigned int _size; unsigned int pos; -} __attribute__ ((gcc_struct)); +} ecere_gcc_struct; extern void * __ecereNameSpace__ecere__com__eSystem_New(unsigned int size); @@ -126,7 +129,7 @@ struct __ecereNameSpace__ecere__com__Instance void * * _vTbl; struct __ecereNameSpace__ecere__com__Class * _class; int _refCount; -} __attribute__ ((gcc_struct)); +} ecere_gcc_struct; extern long long __ecereNameSpace__ecere__com__eClass_GetProperty(struct __ecereNameSpace__ecere__com__Class * _class, const char * name); @@ -198,7 +201,7 @@ const char * category; unsigned int compiled; unsigned int selfWatchable; unsigned int isWatchable; -} __attribute__ ((gcc_struct)); +} ecere_gcc_struct; extern void __ecereNameSpace__ecere__com__eInstance_FireSelfWatchers(struct __ecereNameSpace__ecere__com__Instance * instance, struct __ecereNameSpace__ecere__com__Property * _property); @@ -228,7 +231,7 @@ struct __ecereNameSpace__ecere__sys__BTNode * root; int count; int (* CompareKey)(struct __ecereNameSpace__ecere__sys__BinaryTree * tree, uintptr_t a, uintptr_t b); void (* FreeKey)(void * key); -} __attribute__ ((gcc_struct)); +} ecere_gcc_struct; struct __ecereNameSpace__ecere__com__Method; @@ -247,7 +250,7 @@ void * symbol; const char * dataTypeString; struct Type * dataType; int memberAccess; -} __attribute__ ((gcc_struct)); +} ecere_gcc_struct; struct __ecereNameSpace__ecere__com__Module; @@ -293,7 +296,7 @@ struct __ecereNameSpace__ecere__sys__BinaryTree nameSpaces; struct __ecereNameSpace__ecere__sys__BinaryTree classes; struct __ecereNameSpace__ecere__sys__BinaryTree defines; struct __ecereNameSpace__ecere__sys__BinaryTree functions; -} __attribute__ ((gcc_struct)); +} ecere_gcc_struct; struct __ecereNameSpace__ecere__com__Application { @@ -304,7 +307,7 @@ unsigned int isGUIApp; struct __ecereNameSpace__ecere__sys__OldList allModules; char * parsedCommand; struct __ecereNameSpace__ecere__com__NameSpace systemNameSpace; -} __attribute__ ((gcc_struct)); +} ecere_gcc_struct; struct __ecereNameSpace__ecere__com__Module { @@ -322,7 +325,7 @@ int importType; int origImportType; struct __ecereNameSpace__ecere__com__NameSpace privateNameSpace; struct __ecereNameSpace__ecere__com__NameSpace publicNameSpace; -} __attribute__ ((gcc_struct)); +} ecere_gcc_struct; void __ecereRegisterModule_ecs_main(struct __ecereNameSpace__ecere__com__Instance * module) { @@ -345,7 +348,7 @@ struct { const char * dataTypeString; struct __ecereNameSpace__ecere__com__Class * dataTypeClass; -} __attribute__ ((gcc_struct)) __anon1; +} ecere_gcc_struct __anon1; struct __ecereNameSpace__ecere__com__DataValue expression; struct { @@ -355,10 +358,10 @@ union struct __ecereNameSpace__ecere__com__DataMember * member; struct __ecereNameSpace__ecere__com__Property * prop; struct __ecereNameSpace__ecere__com__Method * method; -} __attribute__ ((gcc_struct)) __anon1; -} __attribute__ ((gcc_struct)) __anon2; -} __attribute__ ((gcc_struct)) __anon1; -} __attribute__ ((gcc_struct)); +} ecere_gcc_struct __anon1; +} ecere_gcc_struct __anon2; +} ecere_gcc_struct __anon1; +} ecere_gcc_struct; struct __ecereNameSpace__ecere__com__DataMember { @@ -380,7 +383,7 @@ struct __ecereNameSpace__ecere__sys__BinaryTree membersAlpha; int memberOffset; short structAlignment; short pointerAlignment; -} __attribute__ ((gcc_struct)); +} ecere_gcc_struct; struct __ecereNameSpace__ecere__com__Class { @@ -439,7 +442,7 @@ struct __ecereNameSpace__ecere__sys__OldList templatized; int numParams; unsigned int isInstanceClass; unsigned int byValueSystemClass; -} __attribute__ ((gcc_struct)); +} ecere_gcc_struct; extern struct __ecereNameSpace__ecere__com__Class * __ecereClass___ecereNameSpace__ecere__com__Instance; diff --git a/compiler/bootstrap/libec/bootstrap/ast.c b/compiler/bootstrap/libec/bootstrap/ast.c index 96e5324..e6e6438 100644 --- a/compiler/bootstrap/libec/bootstrap/ast.c +++ b/compiler/bootstrap/libec/bootstrap/ast.c @@ -38,11 +38,14 @@ typedef unsigned __int64 uint64; #if defined(_WIN32) # if defined(__GNUC__) || defined(__TINYC__) # define ecere_stdcall __attribute__((__stdcall__)) +# define ecere_gcc_struct __attribute__((gcc_struct)) # else # define ecere_stdcall __stdcall +# define ecere_gcc_struct # endif #else # define ecere_stdcall +# define ecere_gcc_struct #endif #include #include @@ -72,7 +75,7 @@ int currentNameSpaceLen; struct ContextStringPair { char * string, * context; -} __attribute__ ((gcc_struct)); +} ecere_gcc_struct; struct __ecereNameSpace__ecere__com__Instance * intlStrings; @@ -107,7 +110,7 @@ void * last; int count; unsigned int offset; unsigned int circ; -} __attribute__ ((gcc_struct)); +} ecere_gcc_struct; struct __ecereNameSpace__ecere__com__DataValue { @@ -124,8 +127,8 @@ float f; double d; long long i64; uint64 ui64; -} __attribute__ ((gcc_struct)) __anon1; -} __attribute__ ((gcc_struct)); +} ecere_gcc_struct __anon1; +} ecere_gcc_struct; struct __ecereNameSpace__ecere__com__SerialBuffer { @@ -133,7 +136,7 @@ unsigned char * _buffer; unsigned int count; unsigned int _size; unsigned int pos; -} __attribute__ ((gcc_struct)); +} ecere_gcc_struct; extern void * __ecereNameSpace__ecere__com__eSystem_New(unsigned int size); @@ -151,7 +154,7 @@ int line; int charPos; int pos; int included; -} __attribute__ ((gcc_struct)); +} ecere_gcc_struct; extern size_t strlen(const char * ); @@ -184,7 +187,7 @@ struct __ecereNameSpace__ecere__com__LinkList void * first; void * last; int count; -} __attribute__ ((gcc_struct)); +} ecere_gcc_struct; extern char * strncpy(char * , const char * , size_t n); @@ -208,7 +211,7 @@ struct __ecereNameSpace__ecere__com__CustomAVLTree { struct __ecereNameSpace__ecere__com__AVLNode * root; int count; -} __attribute__ ((gcc_struct)); +} ecere_gcc_struct; extern const char * GetSourceFile(void); @@ -277,7 +280,7 @@ struct Location { struct CodePosition start; struct CodePosition end; -} __attribute__ ((gcc_struct)); +} ecere_gcc_struct; void SetDefaultNameSpace(const char * s) { @@ -328,7 +331,7 @@ struct Attrib struct Location loc; int type; struct __ecereNameSpace__ecere__sys__OldList * attribs; -} __attribute__ ((gcc_struct)); +} ecere_gcc_struct; struct ExtDecl { @@ -338,8 +341,8 @@ union { char * s; struct Attrib * attr; -} __attribute__ ((gcc_struct)) __anon1; -} __attribute__ ((gcc_struct)); +} ecere_gcc_struct __anon1; +} ecere_gcc_struct; struct Context; @@ -356,7 +359,7 @@ struct __ecereNameSpace__ecere__com__Instance void * * _vTbl; struct __ecereNameSpace__ecere__com__Class * _class; int _refCount; -} __attribute__ ((gcc_struct)); +} ecere_gcc_struct; extern long long __ecereNameSpace__ecere__com__eClass_GetProperty(struct __ecereNameSpace__ecere__com__Class * _class, const char * name); @@ -376,13 +379,13 @@ struct __ecereNameSpace__ecere__com__MapIterator { struct __ecereNameSpace__ecere__com__Instance * container; struct __ecereNameSpace__ecere__com__IteratorPointer * pointer; -} __attribute__ ((gcc_struct)); +} ecere_gcc_struct; struct __ecereNameSpace__ecere__com__Iterator { struct __ecereNameSpace__ecere__com__Instance * container; struct __ecereNameSpace__ecere__com__IteratorPointer * pointer; -} __attribute__ ((gcc_struct)); +} ecere_gcc_struct; int __ecereVMethodID___ecereNameSpace__ecere__com__Container_Add; @@ -424,7 +427,7 @@ struct __ecereNameSpace__ecere__sys__OldList classes; struct __ecereNameSpace__ecere__sys__OldList functions; int importType; int importAccess; -} __attribute__ ((gcc_struct)); +} ecere_gcc_struct; struct Expression; @@ -455,7 +458,7 @@ struct __ecereNameSpace__ecere__sys__BTNode * parent; struct __ecereNameSpace__ecere__sys__BTNode * left; struct __ecereNameSpace__ecere__sys__BTNode * right; int depth; -} __attribute__ ((gcc_struct)); +} ecere_gcc_struct; struct __ecereNameSpace__ecere__sys__BTNode * __ecereProp___ecereNameSpace__ecere__sys__BTNode_Get_next(struct __ecereNameSpace__ecere__sys__BTNode * this); @@ -485,7 +488,7 @@ char * name; struct Symbol * symbol; struct __ecereNameSpace__ecere__sys__OldList * definitions; int declMode; -} __attribute__ ((gcc_struct)); +} ecere_gcc_struct; struct Type; @@ -513,7 +516,7 @@ const char * category; unsigned int compiled; unsigned int selfWatchable; unsigned int isWatchable; -} __attribute__ ((gcc_struct)); +} ecere_gcc_struct; extern void FreeType(struct Type * type); @@ -531,7 +534,7 @@ struct TemplateDatatype { struct __ecereNameSpace__ecere__sys__OldList * specifiers; struct Declarator * decl; -} __attribute__ ((gcc_struct)); +} ecere_gcc_struct; extern struct Declarator * SpecDeclFromString(const char * string, struct __ecereNameSpace__ecere__sys__OldList * specs, struct Declarator * baseDecl); @@ -577,7 +580,7 @@ struct __ecereNameSpace__ecere__sys__NamedLink64 * prev; struct __ecereNameSpace__ecere__sys__NamedLink64 * next; char * name; long long data; -} __attribute__ ((gcc_struct)); +} ecere_gcc_struct; struct __ecereNameSpace__ecere__sys__OldLink; @@ -586,7 +589,7 @@ struct __ecereNameSpace__ecere__sys__OldLink struct __ecereNameSpace__ecere__sys__OldLink * prev; struct __ecereNameSpace__ecere__sys__OldLink * next; void * data; -} __attribute__ ((gcc_struct)); +} ecere_gcc_struct; int CheckType(const char * text); @@ -608,7 +611,7 @@ struct Pointer * next; struct Location loc; struct __ecereNameSpace__ecere__sys__OldList * qualifiers; struct Pointer * pointer; -} __attribute__ ((gcc_struct)); +} ecere_gcc_struct; struct PropertyWatch; @@ -631,7 +634,7 @@ void * symbol; const char * dataTypeString; struct Type * dataType; int memberAccess; -} __attribute__ ((gcc_struct)); +} ecere_gcc_struct; struct Symbol { @@ -646,7 +649,7 @@ union struct __ecereNameSpace__ecere__com__Method * method; struct __ecereNameSpace__ecere__com__Property * _property; struct __ecereNameSpace__ecere__com__Class * registered; -} __attribute__ ((gcc_struct)) __anon1; +} ecere_gcc_struct __anon1; unsigned int notYetDeclared; union { @@ -654,20 +657,20 @@ struct { struct External * pointerExternal; struct External * structExternal; -} __attribute__ ((gcc_struct)) __anon1; +} ecere_gcc_struct __anon1; struct { struct External * externalGet; struct External * externalSet; struct External * externalPtr; struct External * externalIsSet; -} __attribute__ ((gcc_struct)) __anon2; +} ecere_gcc_struct __anon2; struct { struct External * methodExternal; struct External * methodCodeExternal; -} __attribute__ ((gcc_struct)) __anon3; -} __attribute__ ((gcc_struct)) __anon2; +} ecere_gcc_struct __anon3; +} ecere_gcc_struct __anon2; unsigned int imported; unsigned int declaredStructSym; struct __ecereNameSpace__ecere__com__Class * _class; @@ -695,7 +698,7 @@ struct Context * ctx; int isIterator; struct Expression * propCategory; unsigned int mustRegister; -} __attribute__ ((gcc_struct)); +} ecere_gcc_struct; extern struct __ecereNameSpace__ecere__com__Method * __ecereNameSpace__ecere__com__eClass_AddMethod(struct __ecereNameSpace__ecere__com__Class * _class, const char * name, const char * type, void * function, int declMode); @@ -709,7 +712,7 @@ struct { const char * dataTypeString; struct __ecereNameSpace__ecere__com__Class * dataTypeClass; -} __attribute__ ((gcc_struct)) __anon1; +} ecere_gcc_struct __anon1; struct __ecereNameSpace__ecere__com__DataValue expression; struct { @@ -719,10 +722,10 @@ union struct __ecereNameSpace__ecere__com__DataMember * member; struct __ecereNameSpace__ecere__com__Property * prop; struct __ecereNameSpace__ecere__com__Method * method; -} __attribute__ ((gcc_struct)) __anon1; -} __attribute__ ((gcc_struct)) __anon2; -} __attribute__ ((gcc_struct)) __anon1; -} __attribute__ ((gcc_struct)); +} ecere_gcc_struct __anon1; +} ecere_gcc_struct __anon2; +} ecere_gcc_struct __anon1; +} ecere_gcc_struct; extern struct __ecereNameSpace__ecere__com__DataMember * __ecereNameSpace__ecere__com__eClass_AddDataMember(struct __ecereNameSpace__ecere__com__Class * _class, const char * name, const char * type, unsigned int size, unsigned int alignment, int declMode); @@ -757,7 +760,7 @@ struct Initializer * initializer; unsigned int used; unsigned int variable; unsigned int takeOutExp; -} __attribute__ ((gcc_struct)); +} ecere_gcc_struct; struct Attribute; @@ -768,7 +771,7 @@ struct Attribute * next; struct Location loc; char * attr; struct Expression * exp; -} __attribute__ ((gcc_struct)); +} ecere_gcc_struct; struct AsmField; @@ -780,7 +783,7 @@ struct __ecereNameSpace__ecere__sys__BTNode * root; int count; int (* CompareKey)(struct __ecereNameSpace__ecere__sys__BinaryTree * tree, uintptr_t a, uintptr_t b); void (* FreeKey)(void * key); -} __attribute__ ((gcc_struct)); +} ecere_gcc_struct; struct __ecereNameSpace__ecere__com__DataMember { @@ -802,7 +805,7 @@ struct __ecereNameSpace__ecere__sys__BinaryTree membersAlpha; int memberOffset; short structAlignment; short pointerAlignment; -} __attribute__ ((gcc_struct)); +} ecere_gcc_struct; unsigned int __ecereMethod___ecereNameSpace__ecere__sys__BinaryTree_Add(struct __ecereNameSpace__ecere__sys__BinaryTree * this, struct __ecereNameSpace__ecere__sys__BTNode * node); @@ -820,7 +823,7 @@ struct __ecereNameSpace__ecere__sys__BTNode * left; struct __ecereNameSpace__ecere__sys__BTNode * right; int depth; struct TemplateParameter * param; -} __attribute__ ((gcc_struct)); +} ecere_gcc_struct; struct Type { @@ -834,7 +837,7 @@ struct { struct __ecereNameSpace__ecere__sys__OldList members; char * enumName; -} __attribute__ ((gcc_struct)) __anon1; +} ecere_gcc_struct __anon1; struct { struct Type * returnType; @@ -842,13 +845,13 @@ struct __ecereNameSpace__ecere__sys__OldList params; struct Symbol * thisClass; unsigned int staticMethod; struct TemplateParameter * thisClassTemplate; -} __attribute__ ((gcc_struct)) __anon2; +} ecere_gcc_struct __anon2; struct { struct __ecereNameSpace__ecere__com__Method * method; struct __ecereNameSpace__ecere__com__Class * methodClass; struct __ecereNameSpace__ecere__com__Class * usedClass; -} __attribute__ ((gcc_struct)) __anon3; +} ecere_gcc_struct __anon3; struct { struct Type * arrayType; @@ -856,10 +859,10 @@ int arraySize; struct Expression * arraySizeExp; unsigned int freeExp; struct Symbol * enumClass; -} __attribute__ ((gcc_struct)) __anon4; +} ecere_gcc_struct __anon4; struct Type * type; struct TemplateParameter * templateParameter; -} __attribute__ ((gcc_struct)) __anon1; +} ecere_gcc_struct __anon1; int kind; unsigned int size; char * name; @@ -886,7 +889,7 @@ unsigned int typedByReference : 1; unsigned int casted : 1; unsigned int pointerAlignment : 1; unsigned int isLong : 1; -} __attribute__ ((gcc_struct)); +} ecere_gcc_struct; struct TemplatedType * FindTemplateTypeParameter(struct Context * ctx, const char * name); @@ -949,7 +952,7 @@ struct Symbol * classSym; struct Specifier * _class; char * string; struct Identifier * badID; -} __attribute__ ((gcc_struct)); +} ecere_gcc_struct; struct Enumerator { @@ -958,7 +961,7 @@ struct Enumerator * next; struct Location loc; struct Identifier * id; struct Expression * exp; -} __attribute__ ((gcc_struct)); +} ecere_gcc_struct; struct Specifier { @@ -976,7 +979,7 @@ char * name; struct Symbol * symbol; struct __ecereNameSpace__ecere__sys__OldList * templateArgs; struct Specifier * nsSpec; -} __attribute__ ((gcc_struct)) __anon1; +} ecere_gcc_struct __anon1; struct { struct Identifier * id; @@ -986,12 +989,12 @@ struct __ecereNameSpace__ecere__sys__OldList * definitions; unsigned int addNameSpace; struct Context * ctx; struct ExtDecl * extDeclStruct; -} __attribute__ ((gcc_struct)) __anon2; +} ecere_gcc_struct __anon2; struct Expression * expression; struct Specifier * _class; struct TemplateParameter * templateParameter; -} __attribute__ ((gcc_struct)) __anon1; -} __attribute__ ((gcc_struct)); +} ecere_gcc_struct __anon1; +} ecere_gcc_struct; struct Declarator { @@ -1009,26 +1012,26 @@ struct struct Expression * exp; struct Expression * posExp; struct Attrib * attrib; -} __attribute__ ((gcc_struct)) structDecl; +} ecere_gcc_struct structDecl; struct { struct Expression * exp; struct Specifier * enumClass; -} __attribute__ ((gcc_struct)) array; +} ecere_gcc_struct array; struct { struct __ecereNameSpace__ecere__sys__OldList * parameters; -} __attribute__ ((gcc_struct)) function; +} ecere_gcc_struct function; struct { struct Pointer * pointer; -} __attribute__ ((gcc_struct)) pointer; +} ecere_gcc_struct pointer; struct { struct ExtDecl * extended; -} __attribute__ ((gcc_struct)) extended; -} __attribute__ ((gcc_struct)) __anon1; -} __attribute__ ((gcc_struct)); +} ecere_gcc_struct extended; +} ecere_gcc_struct __anon1; +} ecere_gcc_struct; struct Initializer { @@ -1040,10 +1043,10 @@ union { struct Expression * exp; struct __ecereNameSpace__ecere__sys__OldList * list; -} __attribute__ ((gcc_struct)) __anon1; +} ecere_gcc_struct __anon1; unsigned int isConstant; struct Identifier * id; -} __attribute__ ((gcc_struct)); +} ecere_gcc_struct; struct TemplateArgument { @@ -1057,8 +1060,8 @@ union struct Expression * expression; struct Identifier * identifier; struct TemplateDatatype * templateDatatype; -} __attribute__ ((gcc_struct)) __anon1; -} __attribute__ ((gcc_struct)); +} ecere_gcc_struct __anon1; +} ecere_gcc_struct; struct TemplateParameter { @@ -1071,11 +1074,11 @@ union { struct TemplateDatatype * dataType; int memberType; -} __attribute__ ((gcc_struct)) __anon1; +} ecere_gcc_struct __anon1; struct TemplateArgument * defaultArgument; const char * dataTypeString; struct Type * baseType; -} __attribute__ ((gcc_struct)); +} ecere_gcc_struct; struct AsmField { @@ -1085,7 +1088,7 @@ struct Location loc; char * command; struct Expression * expression; struct Identifier * symbolic; -} __attribute__ ((gcc_struct)); +} ecere_gcc_struct; struct DBIndexItem { @@ -1093,7 +1096,7 @@ struct DBIndexItem * prev; struct DBIndexItem * next; struct Identifier * id; int order; -} __attribute__ ((gcc_struct)); +} ecere_gcc_struct; struct Identifier * GetDeclId(struct Declarator * decl) { @@ -1113,7 +1116,7 @@ struct __ecereNameSpace__ecere__sys__OldList * qualifiers; struct Declarator * declarator; int classObjectType; struct Expression * bitCount; -} __attribute__ ((gcc_struct)); +} ecere_gcc_struct; struct DBTableEntry { @@ -1127,10 +1130,10 @@ struct { struct TypeName * dataType; char * name; -} __attribute__ ((gcc_struct)) __anon1; +} ecere_gcc_struct __anon1; struct __ecereNameSpace__ecere__sys__OldList * items; -} __attribute__ ((gcc_struct)) __anon1; -} __attribute__ ((gcc_struct)); +} ecere_gcc_struct __anon1; +} ecere_gcc_struct; struct FunctionDefinition; @@ -1179,7 +1182,7 @@ unsigned char * data; struct Location nameLoc; struct Location insideLoc; unsigned int built; -} __attribute__ ((gcc_struct)); +} ecere_gcc_struct; struct Symbol * _DeclClass(struct Specifier * _class, const char * name); @@ -1236,7 +1239,7 @@ struct __ecereNameSpace__ecere__sys__BinaryTree templateTypes; struct ClassDefinition * classDef; unsigned int templateTypesOnly; unsigned int hasNameSpace; -} __attribute__ ((gcc_struct)); +} ecere_gcc_struct; struct ClassDefinition { @@ -1251,7 +1254,7 @@ struct Location blockStart; struct Location nameLoc; int declMode; unsigned int deleteWatchable; -} __attribute__ ((gcc_struct)); +} ecere_gcc_struct; void PopContext(struct Context * ctx) { @@ -1311,7 +1314,7 @@ struct { char * constant; struct Identifier * identifier; -} __attribute__ ((gcc_struct)) __anon1; +} ecere_gcc_struct __anon1; struct Statement * compound; struct Instantiation * instance; struct @@ -1319,86 +1322,86 @@ struct char * string; unsigned int intlString; unsigned int wideString; -} __attribute__ ((gcc_struct)) __anon2; +} ecere_gcc_struct __anon2; struct __ecereNameSpace__ecere__sys__OldList * list; struct { struct __ecereNameSpace__ecere__sys__OldList * specifiers; struct Declarator * decl; -} __attribute__ ((gcc_struct)) _classExp; +} ecere_gcc_struct _classExp; struct { struct Identifier * id; -} __attribute__ ((gcc_struct)) classData; +} ecere_gcc_struct classData; struct { struct Expression * exp; struct __ecereNameSpace__ecere__sys__OldList * arguments; struct Location argLoc; -} __attribute__ ((gcc_struct)) call; +} ecere_gcc_struct call; struct { struct Expression * exp; struct __ecereNameSpace__ecere__sys__OldList * index; -} __attribute__ ((gcc_struct)) index; +} ecere_gcc_struct index; struct { struct Expression * exp; struct Identifier * member; int memberType; unsigned int thisPtr; -} __attribute__ ((gcc_struct)) member; +} ecere_gcc_struct member; struct { int op; struct Expression * exp1; struct Expression * exp2; -} __attribute__ ((gcc_struct)) op; +} ecere_gcc_struct op; struct TypeName * typeName; struct Specifier * _class; struct { struct TypeName * typeName; struct Expression * exp; -} __attribute__ ((gcc_struct)) cast; +} ecere_gcc_struct cast; struct { struct Expression * cond; struct __ecereNameSpace__ecere__sys__OldList * exp; struct Expression * elseExp; -} __attribute__ ((gcc_struct)) cond; +} ecere_gcc_struct cond; struct { struct TypeName * typeName; struct Expression * size; -} __attribute__ ((gcc_struct)) _new; +} ecere_gcc_struct _new; struct { struct TypeName * typeName; struct Expression * size; struct Expression * exp; -} __attribute__ ((gcc_struct)) _renew; +} ecere_gcc_struct _renew; struct { char * table; struct Identifier * id; -} __attribute__ ((gcc_struct)) db; +} ecere_gcc_struct db; struct { struct Expression * ds; struct Expression * name; -} __attribute__ ((gcc_struct)) dbopen; +} ecere_gcc_struct dbopen; struct { struct TypeName * typeName; struct Initializer * initializer; -} __attribute__ ((gcc_struct)) initializer; +} ecere_gcc_struct initializer; struct { struct Expression * exp; struct TypeName * typeName; -} __attribute__ ((gcc_struct)) vaArg; -} __attribute__ ((gcc_struct)) __anon1; +} ecere_gcc_struct vaArg; +} ecere_gcc_struct __anon1; unsigned int debugValue; struct __ecereNameSpace__ecere__com__DataValue val; uint64 address; @@ -1414,7 +1417,7 @@ unsigned int needCast; unsigned int thisPtr; unsigned int opDestType; unsigned int needTemplateCast; -} __attribute__ ((gcc_struct)); +} ecere_gcc_struct; struct FunctionDefinition { @@ -1432,7 +1435,7 @@ struct Type * type; struct Symbol * propSet; int tempCount; unsigned int propertyNoThis; -} __attribute__ ((gcc_struct)); +} ecere_gcc_struct; struct ClassFunction { @@ -1454,7 +1457,7 @@ unsigned int isDestructor; unsigned int dontMangle; int id; int idCode; -} __attribute__ ((gcc_struct)); +} ecere_gcc_struct; struct PropertyWatch { @@ -1464,7 +1467,7 @@ struct Location loc; struct Statement * compound; struct __ecereNameSpace__ecere__sys__OldList * properties; unsigned int deleteWatch; -} __attribute__ ((gcc_struct)); +} ecere_gcc_struct; struct MembersInit; @@ -1478,8 +1481,8 @@ union { struct __ecereNameSpace__ecere__sys__OldList * dataMembers; struct ClassFunction * function; -} __attribute__ ((gcc_struct)) __anon1; -} __attribute__ ((gcc_struct)); +} ecere_gcc_struct __anon1; +} ecere_gcc_struct; struct __ecereNameSpace__ecere__com__ClassTemplateParameter; @@ -1493,10 +1496,10 @@ union { const char * dataTypeString; int memberType; -} __attribute__ ((gcc_struct)) __anon1; +} ecere_gcc_struct __anon1; struct __ecereNameSpace__ecere__com__ClassTemplateArgument defaultArg; void * param; -} __attribute__ ((gcc_struct)); +} ecere_gcc_struct; struct __ecereNameSpace__ecere__com__SubModule; @@ -1506,7 +1509,7 @@ struct __ecereNameSpace__ecere__com__SubModule * prev; struct __ecereNameSpace__ecere__com__SubModule * next; struct __ecereNameSpace__ecere__com__Instance * module; int importMode; -} __attribute__ ((gcc_struct)); +} ecere_gcc_struct; struct InitDeclarator; @@ -1517,7 +1520,7 @@ struct InitDeclarator * next; struct Location loc; struct Declarator * declarator; struct Initializer * initializer; -} __attribute__ ((gcc_struct)); +} ecere_gcc_struct; struct __ecereNameSpace__ecere__com__NameSpace; @@ -1533,7 +1536,7 @@ struct __ecereNameSpace__ecere__sys__BinaryTree nameSpaces; struct __ecereNameSpace__ecere__sys__BinaryTree classes; struct __ecereNameSpace__ecere__sys__BinaryTree defines; struct __ecereNameSpace__ecere__sys__BinaryTree functions; -} __attribute__ ((gcc_struct)); +} ecere_gcc_struct; struct __ecereNameSpace__ecere__com__Class { @@ -1592,7 +1595,7 @@ struct __ecereNameSpace__ecere__sys__OldList templatized; int numParams; unsigned int isInstanceClass; unsigned int byValueSystemClass; -} __attribute__ ((gcc_struct)); +} ecere_gcc_struct; struct __ecereNameSpace__ecere__com__Application { @@ -1603,7 +1606,7 @@ unsigned int isGUIApp; struct __ecereNameSpace__ecere__sys__OldList allModules; char * parsedCommand; struct __ecereNameSpace__ecere__com__NameSpace systemNameSpace; -} __attribute__ ((gcc_struct)); +} ecere_gcc_struct; static struct __ecereNameSpace__ecere__com__Class * __ecereClass_ContextStringPair; @@ -1734,7 +1737,7 @@ int importType; int origImportType; struct __ecereNameSpace__ecere__com__NameSpace privateNameSpace; struct __ecereNameSpace__ecere__com__NameSpace publicNameSpace; -} __attribute__ ((gcc_struct)); +} ecere_gcc_struct; struct Specifier * MkSpecifier(int specifier) { @@ -3362,18 +3365,18 @@ struct { struct __ecereNameSpace__ecere__sys__OldList * specifiers; struct __ecereNameSpace__ecere__sys__OldList * declarators; -} __attribute__ ((gcc_struct)) __anon1; +} ecere_gcc_struct __anon1; struct Instantiation * inst; struct { struct Identifier * id; struct Expression * exp; -} __attribute__ ((gcc_struct)) __anon2; -} __attribute__ ((gcc_struct)) __anon1; +} ecere_gcc_struct __anon2; +} ecere_gcc_struct __anon1; struct Specifier * extStorage; struct Symbol * symbol; int declMode; -} __attribute__ ((gcc_struct)); +} ecere_gcc_struct; struct Statement { @@ -3388,51 +3391,51 @@ struct { struct Identifier * id; struct Statement * stmt; -} __attribute__ ((gcc_struct)) labeled; +} ecere_gcc_struct labeled; struct { struct Expression * exp; struct Statement * stmt; -} __attribute__ ((gcc_struct)) caseStmt; +} ecere_gcc_struct caseStmt; struct { struct __ecereNameSpace__ecere__sys__OldList * declarations; struct __ecereNameSpace__ecere__sys__OldList * statements; struct Context * context; unsigned int isSwitch; -} __attribute__ ((gcc_struct)) compound; +} ecere_gcc_struct compound; struct { struct __ecereNameSpace__ecere__sys__OldList * exp; struct Statement * stmt; struct Statement * elseStmt; -} __attribute__ ((gcc_struct)) ifStmt; +} ecere_gcc_struct ifStmt; struct { struct __ecereNameSpace__ecere__sys__OldList * exp; struct Statement * stmt; -} __attribute__ ((gcc_struct)) switchStmt; +} ecere_gcc_struct switchStmt; struct { struct __ecereNameSpace__ecere__sys__OldList * exp; struct Statement * stmt; -} __attribute__ ((gcc_struct)) whileStmt; +} ecere_gcc_struct whileStmt; struct { struct __ecereNameSpace__ecere__sys__OldList * exp; struct Statement * stmt; -} __attribute__ ((gcc_struct)) doWhile; +} ecere_gcc_struct doWhile; struct { struct Statement * init; struct Statement * check; struct __ecereNameSpace__ecere__sys__OldList * increment; struct Statement * stmt; -} __attribute__ ((gcc_struct)) forStmt; +} ecere_gcc_struct forStmt; struct { struct Identifier * id; -} __attribute__ ((gcc_struct)) gotoStmt; +} ecere_gcc_struct gotoStmt; struct { struct Specifier * spec; @@ -3440,23 +3443,23 @@ char * statements; struct __ecereNameSpace__ecere__sys__OldList * inputFields; struct __ecereNameSpace__ecere__sys__OldList * outputFields; struct __ecereNameSpace__ecere__sys__OldList * clobberedFields; -} __attribute__ ((gcc_struct)) asmStmt; +} ecere_gcc_struct asmStmt; struct { struct Expression * watcher; struct Expression * object; struct __ecereNameSpace__ecere__sys__OldList * watches; -} __attribute__ ((gcc_struct)) _watch; +} ecere_gcc_struct _watch; struct { struct Identifier * id; struct __ecereNameSpace__ecere__sys__OldList * exp; struct __ecereNameSpace__ecere__sys__OldList * filter; struct Statement * stmt; -} __attribute__ ((gcc_struct)) forEachStmt; +} ecere_gcc_struct forEachStmt; struct Declaration * decl; -} __attribute__ ((gcc_struct)) __anon1; -} __attribute__ ((gcc_struct)); +} ecere_gcc_struct __anon1; +} ecere_gcc_struct; struct External { @@ -3473,13 +3476,13 @@ struct Declaration * declaration; char * importString; struct Identifier * id; struct DBTableDef * table; -} __attribute__ ((gcc_struct)) __anon1; +} ecere_gcc_struct __anon1; int importType; struct External * fwdDecl; struct __ecereNameSpace__ecere__com__Instance * outgoing; struct __ecereNameSpace__ecere__com__Instance * incoming; int nonBreakableIncoming; -} __attribute__ ((gcc_struct)); +} ecere_gcc_struct; struct Declaration * MkDeclarationInst(struct Instantiation * inst) { @@ -4385,7 +4388,7 @@ struct TemplateDatatype * templateDatatype; struct DBTableEntry * dbtableEntry; struct DBIndexItem * dbindexItem; struct DBTableDef * dbtableDef; -} __attribute__ ((gcc_struct)) YYSTYPE; +} ecere_gcc_struct YYSTYPE; extern YYSTYPE yylval; @@ -4408,11 +4411,11 @@ struct { struct Identifier * id; struct Initializer * initializer; -} __attribute__ ((gcc_struct)) __anon1; -} __attribute__ ((gcc_struct)) __anon1; +} ecere_gcc_struct __anon1; +} ecere_gcc_struct __anon1; int memberAccess; void * object; -} __attribute__ ((gcc_struct)); +} ecere_gcc_struct; struct PropertyDef { @@ -4432,8 +4435,8 @@ struct unsigned int conversion : 1; unsigned int isWatchable : 1; unsigned int isDBProp : 1; -} __attribute__ ((gcc_struct)) __anon1; -} __attribute__ ((gcc_struct)); +} ecere_gcc_struct __anon1; +} ecere_gcc_struct; struct ClassDef * MkClassDefFunction(struct ClassFunction * function) { diff --git a/compiler/bootstrap/libec/bootstrap/copy.c b/compiler/bootstrap/libec/bootstrap/copy.c index 2183528..057d4c4 100644 --- a/compiler/bootstrap/libec/bootstrap/copy.c +++ b/compiler/bootstrap/libec/bootstrap/copy.c @@ -38,11 +38,14 @@ typedef unsigned __int64 uint64; #if defined(_WIN32) # if defined(__GNUC__) || defined(__TINYC__) # define ecere_stdcall __attribute__((__stdcall__)) +# define ecere_gcc_struct __attribute__((gcc_struct)) # else # define ecere_stdcall __stdcall +# define ecere_gcc_struct # endif #else # define ecere_stdcall +# define ecere_gcc_struct #endif #include #include @@ -53,7 +56,7 @@ void * last; int count; unsigned int offset; unsigned int circ; -} __attribute__ ((gcc_struct)); +} ecere_gcc_struct; struct __ecereNameSpace__ecere__sys__BTNode; @@ -72,8 +75,8 @@ float f; double d; long long i64; uint64 ui64; -} __attribute__ ((gcc_struct)) __anon1; -} __attribute__ ((gcc_struct)); +} ecere_gcc_struct __anon1; +} ecere_gcc_struct; struct __ecereNameSpace__ecere__com__SerialBuffer { @@ -81,7 +84,7 @@ unsigned char * _buffer; unsigned int count; unsigned int _size; unsigned int pos; -} __attribute__ ((gcc_struct)); +} ecere_gcc_struct; extern void * __ecereNameSpace__ecere__com__eSystem_New(unsigned int size); @@ -99,7 +102,7 @@ int line; int charPos; int pos; int included; -} __attribute__ ((gcc_struct)); +} ecere_gcc_struct; struct Context; @@ -129,14 +132,14 @@ struct Location { struct CodePosition start; struct CodePosition end; -} __attribute__ ((gcc_struct)); +} ecere_gcc_struct; struct Attrib { struct Location loc; int type; struct __ecereNameSpace__ecere__sys__OldList * attribs; -} __attribute__ ((gcc_struct)); +} ecere_gcc_struct; struct ExtDecl { @@ -146,8 +149,8 @@ union { char * s; struct Attrib * attr; -} __attribute__ ((gcc_struct)) __anon1; -} __attribute__ ((gcc_struct)); +} ecere_gcc_struct __anon1; +} ecere_gcc_struct; extern struct Attrib * MkAttrib(int type, struct __ecereNameSpace__ecere__sys__OldList * attribs); @@ -162,7 +165,7 @@ struct __ecereNameSpace__ecere__com__Instance void * * _vTbl; struct __ecereNameSpace__ecere__com__Class * _class; int _refCount; -} __attribute__ ((gcc_struct)); +} ecere_gcc_struct; extern long long __ecereNameSpace__ecere__com__eClass_GetProperty(struct __ecereNameSpace__ecere__com__Class * _class, const char * name); @@ -231,7 +234,7 @@ struct Symbol * classSym; struct Specifier * _class; char * string; struct Identifier * badID; -} __attribute__ ((gcc_struct)); +} ecere_gcc_struct; struct Specifier { @@ -249,7 +252,7 @@ char * name; struct Symbol * symbol; struct __ecereNameSpace__ecere__sys__OldList * templateArgs; struct Specifier * nsSpec; -} __attribute__ ((gcc_struct)) __anon1; +} ecere_gcc_struct __anon1; struct { struct Identifier * id; @@ -259,12 +262,12 @@ struct __ecereNameSpace__ecere__sys__OldList * definitions; unsigned int addNameSpace; struct Context * ctx; struct ExtDecl * extDeclStruct; -} __attribute__ ((gcc_struct)) __anon2; +} ecere_gcc_struct __anon2; struct Expression * expression; struct Specifier * _class; struct TemplateParameter * templateParameter; -} __attribute__ ((gcc_struct)) __anon1; -} __attribute__ ((gcc_struct)); +} ecere_gcc_struct __anon1; +} ecere_gcc_struct; extern struct Specifier * MkSpecifier(int specifier); @@ -302,7 +305,7 @@ struct __ecereNameSpace__ecere__sys__Item { struct __ecereNameSpace__ecere__sys__Item * prev; struct __ecereNameSpace__ecere__sys__Item * next; -} __attribute__ ((gcc_struct)); +} ecere_gcc_struct; struct __ecereNameSpace__ecere__sys__OldList * CopyList(struct __ecereNameSpace__ecere__sys__OldList * source, void * (* CopyFunction)(void *)) { @@ -328,7 +331,7 @@ struct Pointer * next; struct Location loc; struct __ecereNameSpace__ecere__sys__OldList * qualifiers; struct Pointer * pointer; -} __attribute__ ((gcc_struct)); +} ecere_gcc_struct; extern struct Pointer * MkPointer(struct __ecereNameSpace__ecere__sys__OldList * qualifiers, struct Pointer * pointer); @@ -348,26 +351,26 @@ struct struct Expression * exp; struct Expression * posExp; struct Attrib * attrib; -} __attribute__ ((gcc_struct)) structDecl; +} ecere_gcc_struct structDecl; struct { struct Expression * exp; struct Specifier * enumClass; -} __attribute__ ((gcc_struct)) array; +} ecere_gcc_struct array; struct { struct __ecereNameSpace__ecere__sys__OldList * parameters; -} __attribute__ ((gcc_struct)) function; +} ecere_gcc_struct function; struct { struct Pointer * pointer; -} __attribute__ ((gcc_struct)) pointer; +} ecere_gcc_struct pointer; struct { struct ExtDecl * extended; -} __attribute__ ((gcc_struct)) extended; -} __attribute__ ((gcc_struct)) __anon1; -} __attribute__ ((gcc_struct)); +} ecere_gcc_struct extended; +} ecere_gcc_struct __anon1; +} ecere_gcc_struct; extern struct Declarator * MkDeclaratorPointer(struct Pointer * pointer, struct Declarator * declarator); @@ -383,10 +386,10 @@ union { struct Expression * exp; struct __ecereNameSpace__ecere__sys__OldList * list; -} __attribute__ ((gcc_struct)) __anon1; +} ecere_gcc_struct __anon1; unsigned int isConstant; struct Identifier * id; -} __attribute__ ((gcc_struct)); +} ecere_gcc_struct; extern struct Initializer * MkInitializerAssignment(struct Expression * exp); @@ -404,8 +407,8 @@ union { struct __ecereNameSpace__ecere__sys__OldList * dataMembers; struct ClassFunction * function; -} __attribute__ ((gcc_struct)) __anon1; -} __attribute__ ((gcc_struct)); +} ecere_gcc_struct __anon1; +} ecere_gcc_struct; extern struct MembersInit * MkMembersInitList(struct __ecereNameSpace__ecere__sys__OldList * dataMembers); @@ -426,51 +429,51 @@ struct { struct Identifier * id; struct Statement * stmt; -} __attribute__ ((gcc_struct)) labeled; +} ecere_gcc_struct labeled; struct { struct Expression * exp; struct Statement * stmt; -} __attribute__ ((gcc_struct)) caseStmt; +} ecere_gcc_struct caseStmt; struct { struct __ecereNameSpace__ecere__sys__OldList * declarations; struct __ecereNameSpace__ecere__sys__OldList * statements; struct Context * context; unsigned int isSwitch; -} __attribute__ ((gcc_struct)) compound; +} ecere_gcc_struct compound; struct { struct __ecereNameSpace__ecere__sys__OldList * exp; struct Statement * stmt; struct Statement * elseStmt; -} __attribute__ ((gcc_struct)) ifStmt; +} ecere_gcc_struct ifStmt; struct { struct __ecereNameSpace__ecere__sys__OldList * exp; struct Statement * stmt; -} __attribute__ ((gcc_struct)) switchStmt; +} ecere_gcc_struct switchStmt; struct { struct __ecereNameSpace__ecere__sys__OldList * exp; struct Statement * stmt; -} __attribute__ ((gcc_struct)) whileStmt; +} ecere_gcc_struct whileStmt; struct { struct __ecereNameSpace__ecere__sys__OldList * exp; struct Statement * stmt; -} __attribute__ ((gcc_struct)) doWhile; +} ecere_gcc_struct doWhile; struct { struct Statement * init; struct Statement * check; struct __ecereNameSpace__ecere__sys__OldList * increment; struct Statement * stmt; -} __attribute__ ((gcc_struct)) forStmt; +} ecere_gcc_struct forStmt; struct { struct Identifier * id; -} __attribute__ ((gcc_struct)) gotoStmt; +} ecere_gcc_struct gotoStmt; struct { struct Specifier * spec; @@ -478,23 +481,23 @@ char * statements; struct __ecereNameSpace__ecere__sys__OldList * inputFields; struct __ecereNameSpace__ecere__sys__OldList * outputFields; struct __ecereNameSpace__ecere__sys__OldList * clobberedFields; -} __attribute__ ((gcc_struct)) asmStmt; +} ecere_gcc_struct asmStmt; struct { struct Expression * watcher; struct Expression * object; struct __ecereNameSpace__ecere__sys__OldList * watches; -} __attribute__ ((gcc_struct)) _watch; +} ecere_gcc_struct _watch; struct { struct Identifier * id; struct __ecereNameSpace__ecere__sys__OldList * exp; struct __ecereNameSpace__ecere__sys__OldList * filter; struct Statement * stmt; -} __attribute__ ((gcc_struct)) forEachStmt; +} ecere_gcc_struct forEachStmt; struct Declaration * decl; -} __attribute__ ((gcc_struct)) __anon1; -} __attribute__ ((gcc_struct)); +} ecere_gcc_struct __anon1; +} ecere_gcc_struct; extern struct Statement * MkCompoundStmt(struct __ecereNameSpace__ecere__sys__OldList * declarations, struct __ecereNameSpace__ecere__sys__OldList * statements); @@ -510,7 +513,7 @@ struct __ecereNameSpace__ecere__sys__BTNode * root; int count; int (* CompareKey)(struct __ecereNameSpace__ecere__sys__BinaryTree * tree, uintptr_t a, uintptr_t b); void (* FreeKey)(void * key); -} __attribute__ ((gcc_struct)); +} ecere_gcc_struct; struct Attrib * CopyAttrib(struct Attrib * attrib); @@ -558,7 +561,7 @@ const char * category; unsigned int compiled; unsigned int selfWatchable; unsigned int isWatchable; -} __attribute__ ((gcc_struct)); +} ecere_gcc_struct; struct __ecereNameSpace__ecere__com__Method { @@ -575,7 +578,7 @@ void * symbol; const char * dataTypeString; struct Type * dataType; int memberAccess; -} __attribute__ ((gcc_struct)); +} ecere_gcc_struct; struct Symbol { @@ -590,7 +593,7 @@ union struct __ecereNameSpace__ecere__com__Method * method; struct __ecereNameSpace__ecere__com__Property * _property; struct __ecereNameSpace__ecere__com__Class * registered; -} __attribute__ ((gcc_struct)) __anon1; +} ecere_gcc_struct __anon1; unsigned int notYetDeclared; union { @@ -598,20 +601,20 @@ struct { struct External * pointerExternal; struct External * structExternal; -} __attribute__ ((gcc_struct)) __anon1; +} ecere_gcc_struct __anon1; struct { struct External * externalGet; struct External * externalSet; struct External * externalPtr; struct External * externalIsSet; -} __attribute__ ((gcc_struct)) __anon2; +} ecere_gcc_struct __anon2; struct { struct External * methodExternal; struct External * methodCodeExternal; -} __attribute__ ((gcc_struct)) __anon3; -} __attribute__ ((gcc_struct)) __anon2; +} ecere_gcc_struct __anon3; +} ecere_gcc_struct __anon2; unsigned int imported; unsigned int declaredStructSym; struct __ecereNameSpace__ecere__com__Class * _class; @@ -639,7 +642,7 @@ struct Context * ctx; int isIterator; struct Expression * propCategory; unsigned int mustRegister; -} __attribute__ ((gcc_struct)); +} ecere_gcc_struct; struct Type { @@ -653,7 +656,7 @@ struct { struct __ecereNameSpace__ecere__sys__OldList members; char * enumName; -} __attribute__ ((gcc_struct)) __anon1; +} ecere_gcc_struct __anon1; struct { struct Type * returnType; @@ -661,13 +664,13 @@ struct __ecereNameSpace__ecere__sys__OldList params; struct Symbol * thisClass; unsigned int staticMethod; struct TemplateParameter * thisClassTemplate; -} __attribute__ ((gcc_struct)) __anon2; +} ecere_gcc_struct __anon2; struct { struct __ecereNameSpace__ecere__com__Method * method; struct __ecereNameSpace__ecere__com__Class * methodClass; struct __ecereNameSpace__ecere__com__Class * usedClass; -} __attribute__ ((gcc_struct)) __anon3; +} ecere_gcc_struct __anon3; struct { struct Type * arrayType; @@ -675,10 +678,10 @@ int arraySize; struct Expression * arraySizeExp; unsigned int freeExp; struct Symbol * enumClass; -} __attribute__ ((gcc_struct)) __anon4; +} ecere_gcc_struct __anon4; struct Type * type; struct TemplateParameter * templateParameter; -} __attribute__ ((gcc_struct)) __anon1; +} ecere_gcc_struct __anon1; int kind; unsigned int size; char * name; @@ -705,7 +708,7 @@ unsigned int typedByReference : 1; unsigned int casted : 1; unsigned int pointerAlignment : 1; unsigned int isLong : 1; -} __attribute__ ((gcc_struct)); +} ecere_gcc_struct; struct Instantiation; @@ -724,7 +727,7 @@ unsigned char * data; struct Location nameLoc; struct Location insideLoc; unsigned int built; -} __attribute__ ((gcc_struct)); +} ecere_gcc_struct; extern struct Instantiation * MkInstantiation(struct Specifier * _class, struct Expression * exp, struct __ecereNameSpace__ecere__sys__OldList * members); @@ -742,18 +745,18 @@ struct { struct __ecereNameSpace__ecere__sys__OldList * specifiers; struct __ecereNameSpace__ecere__sys__OldList * declarators; -} __attribute__ ((gcc_struct)) __anon1; +} ecere_gcc_struct __anon1; struct Instantiation * inst; struct { struct Identifier * id; struct Expression * exp; -} __attribute__ ((gcc_struct)) __anon2; -} __attribute__ ((gcc_struct)) __anon1; +} ecere_gcc_struct __anon2; +} ecere_gcc_struct __anon1; struct Specifier * extStorage; struct Symbol * symbol; int declMode; -} __attribute__ ((gcc_struct)); +} ecere_gcc_struct; struct TypeName; @@ -769,7 +772,7 @@ struct { char * constant; struct Identifier * identifier; -} __attribute__ ((gcc_struct)) __anon1; +} ecere_gcc_struct __anon1; struct Statement * compound; struct Instantiation * instance; struct @@ -777,86 +780,86 @@ struct char * string; unsigned int intlString; unsigned int wideString; -} __attribute__ ((gcc_struct)) __anon2; +} ecere_gcc_struct __anon2; struct __ecereNameSpace__ecere__sys__OldList * list; struct { struct __ecereNameSpace__ecere__sys__OldList * specifiers; struct Declarator * decl; -} __attribute__ ((gcc_struct)) _classExp; +} ecere_gcc_struct _classExp; struct { struct Identifier * id; -} __attribute__ ((gcc_struct)) classData; +} ecere_gcc_struct classData; struct { struct Expression * exp; struct __ecereNameSpace__ecere__sys__OldList * arguments; struct Location argLoc; -} __attribute__ ((gcc_struct)) call; +} ecere_gcc_struct call; struct { struct Expression * exp; struct __ecereNameSpace__ecere__sys__OldList * index; -} __attribute__ ((gcc_struct)) index; +} ecere_gcc_struct index; struct { struct Expression * exp; struct Identifier * member; int memberType; unsigned int thisPtr; -} __attribute__ ((gcc_struct)) member; +} ecere_gcc_struct member; struct { int op; struct Expression * exp1; struct Expression * exp2; -} __attribute__ ((gcc_struct)) op; +} ecere_gcc_struct op; struct TypeName * typeName; struct Specifier * _class; struct { struct TypeName * typeName; struct Expression * exp; -} __attribute__ ((gcc_struct)) cast; +} ecere_gcc_struct cast; struct { struct Expression * cond; struct __ecereNameSpace__ecere__sys__OldList * exp; struct Expression * elseExp; -} __attribute__ ((gcc_struct)) cond; +} ecere_gcc_struct cond; struct { struct TypeName * typeName; struct Expression * size; -} __attribute__ ((gcc_struct)) _new; +} ecere_gcc_struct _new; struct { struct TypeName * typeName; struct Expression * size; struct Expression * exp; -} __attribute__ ((gcc_struct)) _renew; +} ecere_gcc_struct _renew; struct { char * table; struct Identifier * id; -} __attribute__ ((gcc_struct)) db; +} ecere_gcc_struct db; struct { struct Expression * ds; struct Expression * name; -} __attribute__ ((gcc_struct)) dbopen; +} ecere_gcc_struct dbopen; struct { struct TypeName * typeName; struct Initializer * initializer; -} __attribute__ ((gcc_struct)) initializer; +} ecere_gcc_struct initializer; struct { struct Expression * exp; struct TypeName * typeName; -} __attribute__ ((gcc_struct)) vaArg; -} __attribute__ ((gcc_struct)) __anon1; +} ecere_gcc_struct vaArg; +} ecere_gcc_struct __anon1; unsigned int debugValue; struct __ecereNameSpace__ecere__com__DataValue val; uint64 address; @@ -872,7 +875,7 @@ unsigned int needCast; unsigned int thisPtr; unsigned int opDestType; unsigned int needTemplateCast; -} __attribute__ ((gcc_struct)); +} ecere_gcc_struct; extern struct Expression * MkExpTypeSize(struct TypeName * typeName); @@ -893,7 +896,7 @@ struct __ecereNameSpace__ecere__sys__OldList * qualifiers; struct Declarator * declarator; int classObjectType; struct Expression * bitCount; -} __attribute__ ((gcc_struct)); +} ecere_gcc_struct; extern struct TypeName * MkTypeName(struct __ecereNameSpace__ecere__sys__OldList * qualifiers, struct Declarator * declarator); @@ -908,7 +911,7 @@ struct Enumerator * next; struct Location loc; struct Identifier * id; struct Expression * exp; -} __attribute__ ((gcc_struct)); +} ecere_gcc_struct; struct Attribute; @@ -921,7 +924,7 @@ struct Attribute * next; struct Location loc; char * attr; struct Expression * exp; -} __attribute__ ((gcc_struct)); +} ecere_gcc_struct; struct ClassDef; @@ -944,11 +947,11 @@ struct { struct Identifier * id; struct Initializer * initializer; -} __attribute__ ((gcc_struct)) __anon1; -} __attribute__ ((gcc_struct)) __anon1; +} ecere_gcc_struct __anon1; +} ecere_gcc_struct __anon1; int memberAccess; void * object; -} __attribute__ ((gcc_struct)); +} ecere_gcc_struct; extern struct ClassDef * MkClassDefDeclaration(struct Declaration * decl); @@ -1008,7 +1011,7 @@ struct Initializer * initializer; unsigned int used; unsigned int variable; unsigned int takeOutExp; -} __attribute__ ((gcc_struct)); +} ecere_gcc_struct; struct InitDeclarator; @@ -1021,7 +1024,7 @@ struct InitDeclarator * next; struct Location loc; struct Declarator * declarator; struct Initializer * initializer; -} __attribute__ ((gcc_struct)); +} ecere_gcc_struct; struct __ecereNameSpace__ecere__com__NameSpace; @@ -1037,7 +1040,7 @@ struct __ecereNameSpace__ecere__sys__BinaryTree nameSpaces; struct __ecereNameSpace__ecere__sys__BinaryTree classes; struct __ecereNameSpace__ecere__sys__BinaryTree defines; struct __ecereNameSpace__ecere__sys__BinaryTree functions; -} __attribute__ ((gcc_struct)); +} ecere_gcc_struct; struct __ecereNameSpace__ecere__com__Application { @@ -1048,7 +1051,7 @@ unsigned int isGUIApp; struct __ecereNameSpace__ecere__sys__OldList allModules; char * parsedCommand; struct __ecereNameSpace__ecere__com__NameSpace systemNameSpace; -} __attribute__ ((gcc_struct)); +} ecere_gcc_struct; struct __ecereNameSpace__ecere__com__Module { @@ -1066,7 +1069,7 @@ int importType; int origImportType; struct __ecereNameSpace__ecere__com__NameSpace privateNameSpace; struct __ecereNameSpace__ecere__com__NameSpace publicNameSpace; -} __attribute__ ((gcc_struct)); +} ecere_gcc_struct; void __ecereUnregisterModule_copy(struct __ecereNameSpace__ecere__com__Instance * module) { @@ -1083,7 +1086,7 @@ struct { const char * dataTypeString; struct __ecereNameSpace__ecere__com__Class * dataTypeClass; -} __attribute__ ((gcc_struct)) __anon1; +} ecere_gcc_struct __anon1; struct __ecereNameSpace__ecere__com__DataValue expression; struct { @@ -1093,10 +1096,10 @@ union struct __ecereNameSpace__ecere__com__DataMember * member; struct __ecereNameSpace__ecere__com__Property * prop; struct __ecereNameSpace__ecere__com__Method * method; -} __attribute__ ((gcc_struct)) __anon1; -} __attribute__ ((gcc_struct)) __anon2; -} __attribute__ ((gcc_struct)) __anon1; -} __attribute__ ((gcc_struct)); +} ecere_gcc_struct __anon1; +} ecere_gcc_struct __anon2; +} ecere_gcc_struct __anon1; +} ecere_gcc_struct; struct __ecereNameSpace__ecere__com__DataMember { @@ -1118,7 +1121,7 @@ struct __ecereNameSpace__ecere__sys__BinaryTree membersAlpha; int memberOffset; short structAlignment; short pointerAlignment; -} __attribute__ ((gcc_struct)); +} ecere_gcc_struct; struct __ecereNameSpace__ecere__com__Class { @@ -1177,7 +1180,7 @@ struct __ecereNameSpace__ecere__sys__OldList templatized; int numParams; unsigned int isInstanceClass; unsigned int byValueSystemClass; -} __attribute__ ((gcc_struct)); +} ecere_gcc_struct; extern struct __ecereNameSpace__ecere__com__Class * __ecereClass_Expression; diff --git a/compiler/bootstrap/libec/bootstrap/dbpass.c b/compiler/bootstrap/libec/bootstrap/dbpass.c index 2ef3d10..0f9f0ff 100644 --- a/compiler/bootstrap/libec/bootstrap/dbpass.c +++ b/compiler/bootstrap/libec/bootstrap/dbpass.c @@ -38,11 +38,14 @@ typedef unsigned __int64 uint64; #if defined(_WIN32) # if defined(__GNUC__) || defined(__TINYC__) # define ecere_stdcall __attribute__((__stdcall__)) +# define ecere_gcc_struct __attribute__((gcc_struct)) # else # define ecere_stdcall __stdcall +# define ecere_gcc_struct # endif #else # define ecere_stdcall +# define ecere_gcc_struct #endif #include #include @@ -62,7 +65,7 @@ void * last; int count; unsigned int offset; unsigned int circ; -} __attribute__ ((gcc_struct)); +} ecere_gcc_struct; struct __ecereNameSpace__ecere__sys__BTNode; @@ -81,8 +84,8 @@ float f; double d; long long i64; uint64 ui64; -} __attribute__ ((gcc_struct)) __anon1; -} __attribute__ ((gcc_struct)); +} ecere_gcc_struct __anon1; +} ecere_gcc_struct; struct __ecereNameSpace__ecere__com__SerialBuffer { @@ -90,7 +93,7 @@ unsigned char * _buffer; unsigned int count; unsigned int _size; unsigned int pos; -} __attribute__ ((gcc_struct)); +} ecere_gcc_struct; extern void * __ecereNameSpace__ecere__com__eSystem_New(unsigned int size); @@ -128,7 +131,7 @@ int line; int charPos; int pos; int included; -} __attribute__ ((gcc_struct)); +} ecere_gcc_struct; extern size_t strlen(const char * ); @@ -147,7 +150,7 @@ struct __ecereNameSpace__ecere__com__LinkList void * first; void * last; int count; -} __attribute__ ((gcc_struct)); +} ecere_gcc_struct; extern int strcmp(const char * , const char * ); @@ -183,7 +186,7 @@ struct Location { struct CodePosition start; struct CodePosition end; -} __attribute__ ((gcc_struct)); +} ecere_gcc_struct; extern struct Location yylloc; @@ -222,7 +225,7 @@ struct __ecereNameSpace__ecere__com__Instance void * * _vTbl; struct __ecereNameSpace__ecere__com__Class * _class; int _refCount; -} __attribute__ ((gcc_struct)); +} ecere_gcc_struct; extern long long __ecereNameSpace__ecere__com__eClass_GetProperty(struct __ecereNameSpace__ecere__com__Class * _class, const char * name); @@ -315,51 +318,51 @@ struct { struct Identifier * id; struct Statement * stmt; -} __attribute__ ((gcc_struct)) labeled; +} ecere_gcc_struct labeled; struct { struct Expression * exp; struct Statement * stmt; -} __attribute__ ((gcc_struct)) caseStmt; +} ecere_gcc_struct caseStmt; struct { struct __ecereNameSpace__ecere__sys__OldList * declarations; struct __ecereNameSpace__ecere__sys__OldList * statements; struct Context * context; unsigned int isSwitch; -} __attribute__ ((gcc_struct)) compound; +} ecere_gcc_struct compound; struct { struct __ecereNameSpace__ecere__sys__OldList * exp; struct Statement * stmt; struct Statement * elseStmt; -} __attribute__ ((gcc_struct)) ifStmt; +} ecere_gcc_struct ifStmt; struct { struct __ecereNameSpace__ecere__sys__OldList * exp; struct Statement * stmt; -} __attribute__ ((gcc_struct)) switchStmt; +} ecere_gcc_struct switchStmt; struct { struct __ecereNameSpace__ecere__sys__OldList * exp; struct Statement * stmt; -} __attribute__ ((gcc_struct)) whileStmt; +} ecere_gcc_struct whileStmt; struct { struct __ecereNameSpace__ecere__sys__OldList * exp; struct Statement * stmt; -} __attribute__ ((gcc_struct)) doWhile; +} ecere_gcc_struct doWhile; struct { struct Statement * init; struct Statement * check; struct __ecereNameSpace__ecere__sys__OldList * increment; struct Statement * stmt; -} __attribute__ ((gcc_struct)) forStmt; +} ecere_gcc_struct forStmt; struct { struct Identifier * id; -} __attribute__ ((gcc_struct)) gotoStmt; +} ecere_gcc_struct gotoStmt; struct { struct Specifier * spec; @@ -367,23 +370,23 @@ char * statements; struct __ecereNameSpace__ecere__sys__OldList * inputFields; struct __ecereNameSpace__ecere__sys__OldList * outputFields; struct __ecereNameSpace__ecere__sys__OldList * clobberedFields; -} __attribute__ ((gcc_struct)) asmStmt; +} ecere_gcc_struct asmStmt; struct { struct Expression * watcher; struct Expression * object; struct __ecereNameSpace__ecere__sys__OldList * watches; -} __attribute__ ((gcc_struct)) _watch; +} ecere_gcc_struct _watch; struct { struct Identifier * id; struct __ecereNameSpace__ecere__sys__OldList * exp; struct __ecereNameSpace__ecere__sys__OldList * filter; struct Statement * stmt; -} __attribute__ ((gcc_struct)) forEachStmt; +} ecere_gcc_struct forEachStmt; struct Declaration * decl; -} __attribute__ ((gcc_struct)) __anon1; -} __attribute__ ((gcc_struct)); +} ecere_gcc_struct __anon1; +} ecere_gcc_struct; extern struct Declaration * MkDeclaration(struct __ecereNameSpace__ecere__sys__OldList * specifiers, struct __ecereNameSpace__ecere__sys__OldList * initDeclarators); @@ -407,10 +410,10 @@ union { struct Expression * exp; struct __ecereNameSpace__ecere__sys__OldList * list; -} __attribute__ ((gcc_struct)) __anon1; +} ecere_gcc_struct __anon1; unsigned int isConstant; struct Identifier * id; -} __attribute__ ((gcc_struct)); +} ecere_gcc_struct; struct Symbol; @@ -430,7 +433,7 @@ char * name; struct Symbol * symbol; struct __ecereNameSpace__ecere__sys__OldList * templateArgs; struct Specifier * nsSpec; -} __attribute__ ((gcc_struct)) __anon1; +} ecere_gcc_struct __anon1; struct { struct Identifier * id; @@ -440,12 +443,12 @@ struct __ecereNameSpace__ecere__sys__OldList * definitions; unsigned int addNameSpace; struct Context * ctx; struct ExtDecl * extDeclStruct; -} __attribute__ ((gcc_struct)) __anon2; +} ecere_gcc_struct __anon2; struct Expression * expression; struct Specifier * _class; struct TemplateParameter * templateParameter; -} __attribute__ ((gcc_struct)) __anon1; -} __attribute__ ((gcc_struct)); +} ecere_gcc_struct __anon1; +} ecere_gcc_struct; struct Identifier { @@ -456,7 +459,7 @@ struct Symbol * classSym; struct Specifier * _class; char * string; struct Identifier * badID; -} __attribute__ ((gcc_struct)); +} ecere_gcc_struct; struct Declaration { @@ -470,18 +473,18 @@ struct { struct __ecereNameSpace__ecere__sys__OldList * specifiers; struct __ecereNameSpace__ecere__sys__OldList * declarators; -} __attribute__ ((gcc_struct)) __anon1; +} ecere_gcc_struct __anon1; struct Instantiation * inst; struct { struct Identifier * id; struct Expression * exp; -} __attribute__ ((gcc_struct)) __anon2; -} __attribute__ ((gcc_struct)) __anon1; +} ecere_gcc_struct __anon2; +} ecere_gcc_struct __anon1; struct Specifier * extStorage; struct Symbol * symbol; int declMode; -} __attribute__ ((gcc_struct)); +} ecere_gcc_struct; struct Instantiation { @@ -498,7 +501,7 @@ unsigned char * data; struct Location nameLoc; struct Location insideLoc; unsigned int built; -} __attribute__ ((gcc_struct)); +} ecere_gcc_struct; struct PropertyDef { @@ -518,8 +521,8 @@ struct unsigned int conversion : 1; unsigned int isWatchable : 1; unsigned int isDBProp : 1; -} __attribute__ ((gcc_struct)) __anon1; -} __attribute__ ((gcc_struct)); +} ecere_gcc_struct __anon1; +} ecere_gcc_struct; struct DBTableDef { @@ -527,7 +530,7 @@ char * name; struct Symbol * symbol; struct __ecereNameSpace__ecere__sys__OldList * definitions; int declMode; -} __attribute__ ((gcc_struct)); +} ecere_gcc_struct; extern struct Symbol * DeclClass(struct Specifier * _class, const char * name); @@ -551,7 +554,7 @@ struct __ecereNameSpace__ecere__sys__BTNode * root; int count; int (* CompareKey)(struct __ecereNameSpace__ecere__sys__BinaryTree * tree, uintptr_t a, uintptr_t b); void (* FreeKey)(void * key); -} __attribute__ ((gcc_struct)); +} ecere_gcc_struct; struct ClassDefinition; @@ -568,7 +571,7 @@ struct Location blockStart; struct Location nameLoc; int declMode; unsigned int deleteWatchable; -} __attribute__ ((gcc_struct)); +} ecere_gcc_struct; extern struct ClassDefinition * MkClass(struct Symbol * symbol, struct __ecereNameSpace__ecere__sys__OldList * baseSpecs, struct __ecereNameSpace__ecere__sys__OldList * definitions); @@ -587,7 +590,7 @@ struct __ecereNameSpace__ecere__sys__BinaryTree templateTypes; struct ClassDefinition * classDef; unsigned int templateTypesOnly; unsigned int hasNameSpace; -} __attribute__ ((gcc_struct)); +} ecere_gcc_struct; struct DBTableEntry; @@ -599,7 +602,7 @@ struct DBIndexItem * prev; struct DBIndexItem * next; struct Identifier * id; int order; -} __attribute__ ((gcc_struct)); +} ecere_gcc_struct; struct __ecereNameSpace__ecere__com__Method; @@ -633,7 +636,7 @@ const char * category; unsigned int compiled; unsigned int selfWatchable; unsigned int isWatchable; -} __attribute__ ((gcc_struct)); +} ecere_gcc_struct; struct __ecereNameSpace__ecere__com__Method { @@ -650,7 +653,7 @@ void * symbol; const char * dataTypeString; struct Type * dataType; int memberAccess; -} __attribute__ ((gcc_struct)); +} ecere_gcc_struct; struct Symbol { @@ -665,7 +668,7 @@ union struct __ecereNameSpace__ecere__com__Method * method; struct __ecereNameSpace__ecere__com__Property * _property; struct __ecereNameSpace__ecere__com__Class * registered; -} __attribute__ ((gcc_struct)) __anon1; +} ecere_gcc_struct __anon1; unsigned int notYetDeclared; union { @@ -673,20 +676,20 @@ struct { struct External * pointerExternal; struct External * structExternal; -} __attribute__ ((gcc_struct)) __anon1; +} ecere_gcc_struct __anon1; struct { struct External * externalGet; struct External * externalSet; struct External * externalPtr; struct External * externalIsSet; -} __attribute__ ((gcc_struct)) __anon2; +} ecere_gcc_struct __anon2; struct { struct External * methodExternal; struct External * methodCodeExternal; -} __attribute__ ((gcc_struct)) __anon3; -} __attribute__ ((gcc_struct)) __anon2; +} ecere_gcc_struct __anon3; +} ecere_gcc_struct __anon2; unsigned int imported; unsigned int declaredStructSym; struct __ecereNameSpace__ecere__com__Class * _class; @@ -714,7 +717,7 @@ struct Context * ctx; int isIterator; struct Expression * propCategory; unsigned int mustRegister; -} __attribute__ ((gcc_struct)); +} ecere_gcc_struct; struct Type { @@ -728,7 +731,7 @@ struct { struct __ecereNameSpace__ecere__sys__OldList members; char * enumName; -} __attribute__ ((gcc_struct)) __anon1; +} ecere_gcc_struct __anon1; struct { struct Type * returnType; @@ -736,13 +739,13 @@ struct __ecereNameSpace__ecere__sys__OldList params; struct Symbol * thisClass; unsigned int staticMethod; struct TemplateParameter * thisClassTemplate; -} __attribute__ ((gcc_struct)) __anon2; +} ecere_gcc_struct __anon2; struct { struct __ecereNameSpace__ecere__com__Method * method; struct __ecereNameSpace__ecere__com__Class * methodClass; struct __ecereNameSpace__ecere__com__Class * usedClass; -} __attribute__ ((gcc_struct)) __anon3; +} ecere_gcc_struct __anon3; struct { struct Type * arrayType; @@ -750,10 +753,10 @@ int arraySize; struct Expression * arraySizeExp; unsigned int freeExp; struct Symbol * enumClass; -} __attribute__ ((gcc_struct)) __anon4; +} ecere_gcc_struct __anon4; struct Type * type; struct TemplateParameter * templateParameter; -} __attribute__ ((gcc_struct)) __anon1; +} ecere_gcc_struct __anon1; int kind; unsigned int size; char * name; @@ -780,7 +783,7 @@ unsigned int typedByReference : 1; unsigned int casted : 1; unsigned int pointerAlignment : 1; unsigned int isLong : 1; -} __attribute__ ((gcc_struct)); +} ecere_gcc_struct; struct TypeName; @@ -796,7 +799,7 @@ struct { char * constant; struct Identifier * identifier; -} __attribute__ ((gcc_struct)) __anon1; +} ecere_gcc_struct __anon1; struct Statement * compound; struct Instantiation * instance; struct @@ -804,86 +807,86 @@ struct char * string; unsigned int intlString; unsigned int wideString; -} __attribute__ ((gcc_struct)) __anon2; +} ecere_gcc_struct __anon2; struct __ecereNameSpace__ecere__sys__OldList * list; struct { struct __ecereNameSpace__ecere__sys__OldList * specifiers; struct Declarator * decl; -} __attribute__ ((gcc_struct)) _classExp; +} ecere_gcc_struct _classExp; struct { struct Identifier * id; -} __attribute__ ((gcc_struct)) classData; +} ecere_gcc_struct classData; struct { struct Expression * exp; struct __ecereNameSpace__ecere__sys__OldList * arguments; struct Location argLoc; -} __attribute__ ((gcc_struct)) call; +} ecere_gcc_struct call; struct { struct Expression * exp; struct __ecereNameSpace__ecere__sys__OldList * index; -} __attribute__ ((gcc_struct)) index; +} ecere_gcc_struct index; struct { struct Expression * exp; struct Identifier * member; int memberType; unsigned int thisPtr; -} __attribute__ ((gcc_struct)) member; +} ecere_gcc_struct member; struct { int op; struct Expression * exp1; struct Expression * exp2; -} __attribute__ ((gcc_struct)) op; +} ecere_gcc_struct op; struct TypeName * typeName; struct Specifier * _class; struct { struct TypeName * typeName; struct Expression * exp; -} __attribute__ ((gcc_struct)) cast; +} ecere_gcc_struct cast; struct { struct Expression * cond; struct __ecereNameSpace__ecere__sys__OldList * exp; struct Expression * elseExp; -} __attribute__ ((gcc_struct)) cond; +} ecere_gcc_struct cond; struct { struct TypeName * typeName; struct Expression * size; -} __attribute__ ((gcc_struct)) _new; +} ecere_gcc_struct _new; struct { struct TypeName * typeName; struct Expression * size; struct Expression * exp; -} __attribute__ ((gcc_struct)) _renew; +} ecere_gcc_struct _renew; struct { char * table; struct Identifier * id; -} __attribute__ ((gcc_struct)) db; +} ecere_gcc_struct db; struct { struct Expression * ds; struct Expression * name; -} __attribute__ ((gcc_struct)) dbopen; +} ecere_gcc_struct dbopen; struct { struct TypeName * typeName; struct Initializer * initializer; -} __attribute__ ((gcc_struct)) initializer; +} ecere_gcc_struct initializer; struct { struct Expression * exp; struct TypeName * typeName; -} __attribute__ ((gcc_struct)) vaArg; -} __attribute__ ((gcc_struct)) __anon1; +} ecere_gcc_struct vaArg; +} ecere_gcc_struct __anon1; unsigned int debugValue; struct __ecereNameSpace__ecere__com__DataValue val; uint64 address; @@ -899,7 +902,7 @@ unsigned int needCast; unsigned int thisPtr; unsigned int opDestType; unsigned int needTemplateCast; -} __attribute__ ((gcc_struct)); +} ecere_gcc_struct; struct DBTableEntry { @@ -913,10 +916,10 @@ struct { struct TypeName * dataType; char * name; -} __attribute__ ((gcc_struct)) __anon1; +} ecere_gcc_struct __anon1; struct __ecereNameSpace__ecere__sys__OldList * items; -} __attribute__ ((gcc_struct)) __anon1; -} __attribute__ ((gcc_struct)); +} ecere_gcc_struct __anon1; +} ecere_gcc_struct; struct TypeName { @@ -927,7 +930,7 @@ struct __ecereNameSpace__ecere__sys__OldList * qualifiers; struct Declarator * declarator; int classObjectType; struct Expression * bitCount; -} __attribute__ ((gcc_struct)); +} ecere_gcc_struct; struct PropertyWatch; @@ -939,7 +942,7 @@ struct Location loc; struct Statement * compound; struct __ecereNameSpace__ecere__sys__OldList * properties; unsigned int deleteWatch; -} __attribute__ ((gcc_struct)); +} ecere_gcc_struct; struct MemberInit; @@ -954,7 +957,7 @@ struct Initializer * initializer; unsigned int used; unsigned int variable; unsigned int takeOutExp; -} __attribute__ ((gcc_struct)); +} ecere_gcc_struct; extern struct MemberInit * MkMemberInit(struct __ecereNameSpace__ecere__sys__OldList * ids, struct Initializer * initializer); @@ -971,7 +974,7 @@ struct InitDeclarator * next; struct Location loc; struct Declarator * declarator; struct Initializer * initializer; -} __attribute__ ((gcc_struct)); +} ecere_gcc_struct; static void ProcessExpression(struct Expression * exp); @@ -1044,11 +1047,11 @@ struct { struct Identifier * id; struct Initializer * initializer; -} __attribute__ ((gcc_struct)) __anon1; -} __attribute__ ((gcc_struct)) __anon1; +} ecere_gcc_struct __anon1; +} ecere_gcc_struct __anon1; int memberAccess; void * object; -} __attribute__ ((gcc_struct)); +} ecere_gcc_struct; struct MembersInit { @@ -1060,8 +1063,8 @@ union { struct __ecereNameSpace__ecere__sys__OldList * dataMembers; struct ClassFunction * function; -} __attribute__ ((gcc_struct)) __anon1; -} __attribute__ ((gcc_struct)); +} ecere_gcc_struct __anon1; +} ecere_gcc_struct; struct ClassFunction { @@ -1083,7 +1086,7 @@ unsigned int isDestructor; unsigned int dontMangle; int id; int idCode; -} __attribute__ ((gcc_struct)); +} ecere_gcc_struct; static void ProcessClassFunction(struct ClassFunction * func) { @@ -1131,7 +1134,7 @@ struct __ecereNameSpace__ecere__sys__BinaryTree nameSpaces; struct __ecereNameSpace__ecere__sys__BinaryTree classes; struct __ecereNameSpace__ecere__sys__BinaryTree defines; struct __ecereNameSpace__ecere__sys__BinaryTree functions; -} __attribute__ ((gcc_struct)); +} ecere_gcc_struct; struct __ecereNameSpace__ecere__com__Application { @@ -1142,7 +1145,7 @@ unsigned int isGUIApp; struct __ecereNameSpace__ecere__sys__OldList allModules; char * parsedCommand; struct __ecereNameSpace__ecere__com__NameSpace systemNameSpace; -} __attribute__ ((gcc_struct)); +} ecere_gcc_struct; struct __ecereNameSpace__ecere__com__Module { @@ -1160,7 +1163,7 @@ int importType; int origImportType; struct __ecereNameSpace__ecere__com__NameSpace privateNameSpace; struct __ecereNameSpace__ecere__com__NameSpace publicNameSpace; -} __attribute__ ((gcc_struct)); +} ecere_gcc_struct; void __ecereUnregisterModule_dbpass(struct __ecereNameSpace__ecere__com__Instance * module) { @@ -1209,7 +1212,7 @@ struct TemplateDatatype * templateDatatype; struct DBTableEntry * dbtableEntry; struct DBIndexItem * dbindexItem; struct DBTableDef * dbtableDef; -} __attribute__ ((gcc_struct)) YYSTYPE; +} ecere_gcc_struct YYSTYPE; extern YYSTYPE yylval; @@ -1229,7 +1232,7 @@ struct Type * type; struct Symbol * propSet; int tempCount; unsigned int propertyNoThis; -} __attribute__ ((gcc_struct)); +} ecere_gcc_struct; struct External { @@ -1246,13 +1249,13 @@ struct Declaration * declaration; char * importString; struct Identifier * id; struct DBTableDef * table; -} __attribute__ ((gcc_struct)) __anon1; +} ecere_gcc_struct __anon1; int importType; struct External * fwdDecl; struct __ecereNameSpace__ecere__com__Instance * outgoing; struct __ecereNameSpace__ecere__com__Instance * incoming; int nonBreakableIncoming; -} __attribute__ ((gcc_struct)); +} ecere_gcc_struct; static void ProcessFunction(struct FunctionDefinition * func) { @@ -1272,7 +1275,7 @@ struct { const char * dataTypeString; struct __ecereNameSpace__ecere__com__Class * dataTypeClass; -} __attribute__ ((gcc_struct)) __anon1; +} ecere_gcc_struct __anon1; struct __ecereNameSpace__ecere__com__DataValue expression; struct { @@ -1282,10 +1285,10 @@ union struct __ecereNameSpace__ecere__com__DataMember * member; struct __ecereNameSpace__ecere__com__Property * prop; struct __ecereNameSpace__ecere__com__Method * method; -} __attribute__ ((gcc_struct)) __anon1; -} __attribute__ ((gcc_struct)) __anon2; -} __attribute__ ((gcc_struct)) __anon1; -} __attribute__ ((gcc_struct)); +} ecere_gcc_struct __anon1; +} ecere_gcc_struct __anon2; +} ecere_gcc_struct __anon1; +} ecere_gcc_struct; struct __ecereNameSpace__ecere__com__DataMember { @@ -1307,7 +1310,7 @@ struct __ecereNameSpace__ecere__sys__BinaryTree membersAlpha; int memberOffset; short structAlignment; short pointerAlignment; -} __attribute__ ((gcc_struct)); +} ecere_gcc_struct; struct __ecereNameSpace__ecere__com__Class { @@ -1366,7 +1369,7 @@ struct __ecereNameSpace__ecere__sys__OldList templatized; int numParams; unsigned int isInstanceClass; unsigned int byValueSystemClass; -} __attribute__ ((gcc_struct)); +} ecere_gcc_struct; extern struct __ecereNameSpace__ecere__com__Class * __ecereClass_Context; diff --git a/compiler/bootstrap/libec/bootstrap/ec.main.c b/compiler/bootstrap/libec/bootstrap/ec.main.c index 3b9ab5f..d7321ee 100644 --- a/compiler/bootstrap/libec/bootstrap/ec.main.c +++ b/compiler/bootstrap/libec/bootstrap/ec.main.c @@ -38,11 +38,14 @@ typedef unsigned __int64 uint64; #if defined(_WIN32) # if defined(__GNUC__) || defined(__TINYC__) # define ecere_stdcall __attribute__((__stdcall__)) +# define ecere_gcc_struct __attribute__((gcc_struct)) # else # define ecere_stdcall __stdcall +# define ecere_gcc_struct # endif #else # define ecere_stdcall +# define ecere_gcc_struct #endif #include #include @@ -111,7 +114,7 @@ void * last; int count; unsigned int offset; unsigned int circ; -} __attribute__ ((gcc_struct)); +} ecere_gcc_struct; struct __ecereNameSpace__ecere__sys__BTNode; @@ -132,8 +135,8 @@ float f; double d; long long i64; uint64 ui64; -} __attribute__ ((gcc_struct)) __anon1; -} __attribute__ ((gcc_struct)); +} ecere_gcc_struct __anon1; +} ecere_gcc_struct; struct __ecereNameSpace__ecere__com__SerialBuffer { @@ -141,7 +144,7 @@ unsigned char * _buffer; unsigned int count; unsigned int _size; unsigned int pos; -} __attribute__ ((gcc_struct)); +} ecere_gcc_struct; extern void * __ecereNameSpace__ecere__com__eSystem_New(unsigned int size); @@ -164,7 +167,7 @@ struct __ecereNameSpace__ecere__com__Instance void * * _vTbl; struct __ecereNameSpace__ecere__com__Class * _class; int _refCount; -} __attribute__ ((gcc_struct)); +} ecere_gcc_struct; extern long long __ecereNameSpace__ecere__com__eClass_GetProperty(struct __ecereNameSpace__ecere__com__Class * _class, const char * name); @@ -334,7 +337,7 @@ const char * category; unsigned int compiled; unsigned int selfWatchable; unsigned int isWatchable; -} __attribute__ ((gcc_struct)); +} ecere_gcc_struct; extern void __ecereNameSpace__ecere__com__eInstance_FireSelfWatchers(struct __ecereNameSpace__ecere__com__Instance * instance, struct __ecereNameSpace__ecere__com__Property * _property); @@ -380,7 +383,7 @@ struct __ecereNameSpace__ecere__sys__BTNode * root; int count; int (* CompareKey)(struct __ecereNameSpace__ecere__sys__BinaryTree * tree, uintptr_t a, uintptr_t b); void (* FreeKey)(void * key); -} __attribute__ ((gcc_struct)); +} ecere_gcc_struct; struct __ecereNameSpace__ecere__com__Method; @@ -399,7 +402,7 @@ void * symbol; const char * dataTypeString; struct Type * dataType; int memberAccess; -} __attribute__ ((gcc_struct)); +} ecere_gcc_struct; struct __ecereNameSpace__ecere__com__Module; @@ -729,7 +732,7 @@ struct __ecereNameSpace__ecere__sys__BinaryTree nameSpaces; struct __ecereNameSpace__ecere__sys__BinaryTree classes; struct __ecereNameSpace__ecere__sys__BinaryTree defines; struct __ecereNameSpace__ecere__sys__BinaryTree functions; -} __attribute__ ((gcc_struct)); +} ecere_gcc_struct; struct __ecereNameSpace__ecere__com__Application { @@ -740,7 +743,7 @@ unsigned int isGUIApp; struct __ecereNameSpace__ecere__sys__OldList allModules; char * parsedCommand; struct __ecereNameSpace__ecere__com__NameSpace systemNameSpace; -} __attribute__ ((gcc_struct)); +} ecere_gcc_struct; struct __ecereNameSpace__ecere__com__Module { @@ -758,7 +761,7 @@ int importType; int origImportType; struct __ecereNameSpace__ecere__com__NameSpace privateNameSpace; struct __ecereNameSpace__ecere__com__NameSpace publicNameSpace; -} __attribute__ ((gcc_struct)); +} ecere_gcc_struct; void __ecereRegisterModule_ec_main(struct __ecereNameSpace__ecere__com__Instance * module) { @@ -781,7 +784,7 @@ struct { const char * dataTypeString; struct __ecereNameSpace__ecere__com__Class * dataTypeClass; -} __attribute__ ((gcc_struct)) __anon1; +} ecere_gcc_struct __anon1; struct __ecereNameSpace__ecere__com__DataValue expression; struct { @@ -791,10 +794,10 @@ union struct __ecereNameSpace__ecere__com__DataMember * member; struct __ecereNameSpace__ecere__com__Property * prop; struct __ecereNameSpace__ecere__com__Method * method; -} __attribute__ ((gcc_struct)) __anon1; -} __attribute__ ((gcc_struct)) __anon2; -} __attribute__ ((gcc_struct)) __anon1; -} __attribute__ ((gcc_struct)); +} ecere_gcc_struct __anon1; +} ecere_gcc_struct __anon2; +} ecere_gcc_struct __anon1; +} ecere_gcc_struct; struct __ecereNameSpace__ecere__com__DataMember { @@ -816,7 +819,7 @@ struct __ecereNameSpace__ecere__sys__BinaryTree membersAlpha; int memberOffset; short structAlignment; short pointerAlignment; -} __attribute__ ((gcc_struct)); +} ecere_gcc_struct; struct __ecereNameSpace__ecere__com__Class { @@ -875,5 +878,5 @@ struct __ecereNameSpace__ecere__sys__OldList templatized; int numParams; unsigned int isInstanceClass; unsigned int byValueSystemClass; -} __attribute__ ((gcc_struct)); +} ecere_gcc_struct; diff --git a/compiler/bootstrap/libec/bootstrap/ecdefs.c b/compiler/bootstrap/libec/bootstrap/ecdefs.c index 0c2892c..1b853b6 100644 --- a/compiler/bootstrap/libec/bootstrap/ecdefs.c +++ b/compiler/bootstrap/libec/bootstrap/ecdefs.c @@ -38,11 +38,14 @@ typedef unsigned __int64 uint64; #if defined(_WIN32) # if defined(__GNUC__) || defined(__TINYC__) # define ecere_stdcall __attribute__((__stdcall__)) +# define ecere_gcc_struct __attribute__((gcc_struct)) # else # define ecere_stdcall __stdcall +# define ecere_gcc_struct # endif #else # define ecere_stdcall +# define ecere_gcc_struct #endif #include #include @@ -115,7 +118,7 @@ int first_line; int first_column; int last_line; int last_column; -} __attribute__ ((gcc_struct)) YYLTYPE; +} ecere_gcc_struct YYLTYPE; extern YYLTYPE _yylloc; @@ -137,7 +140,7 @@ struct CodePosition { int line, charPos, pos; int included; -} __attribute__ ((gcc_struct)); +} ecere_gcc_struct; extern unsigned int parsingType; @@ -163,7 +166,7 @@ void * last; int count; unsigned int offset; unsigned int circ; -} __attribute__ ((gcc_struct)); +} ecere_gcc_struct; struct __ecereNameSpace__ecere__com__DataValue { @@ -180,21 +183,21 @@ float f; double d; long long i64; uint64 ui64; -} __attribute__ ((gcc_struct)) __anon1; -} __attribute__ ((gcc_struct)); +} ecere_gcc_struct __anon1; +} ecere_gcc_struct; struct __ecereNameSpace__ecere__com__LinkElement { void * prev; void * next; -} __attribute__ ((gcc_struct)); +} ecere_gcc_struct; struct __ecereNameSpace__ecere__com__LinkList { void * first; void * last; int count; -} __attribute__ ((gcc_struct)); +} ecere_gcc_struct; struct __ecereNameSpace__ecere__com__SerialBuffer { @@ -202,7 +205,7 @@ unsigned char * _buffer; unsigned int count; unsigned int _size; unsigned int pos; -} __attribute__ ((gcc_struct)); +} ecere_gcc_struct; extern void * __ecereNameSpace__ecere__com__eSystem_New(unsigned int size); @@ -301,7 +304,7 @@ outputLineNumbers = value; struct Location { struct CodePosition start, end; -} __attribute__ ((gcc_struct)); +} ecere_gcc_struct; int GetNumWarnings() { @@ -396,14 +399,14 @@ struct __ecereNameSpace__ecere__gui__controls__BufferLocation struct __ecereNameSpace__ecere__gui__controls__EditLine * line; int y; int x; -} __attribute__ ((gcc_struct)); +} ecere_gcc_struct; struct Attrib { struct Location loc; int type; struct __ecereNameSpace__ecere__sys__OldList * attribs; -} __attribute__ ((gcc_struct)); +} ecere_gcc_struct; unsigned int __ecereMethod_Location_Inside(struct Location * this, int line, int charPos) { @@ -481,8 +484,8 @@ union { char * s; struct Attrib * attr; -} __attribute__ ((gcc_struct)) __anon1; -} __attribute__ ((gcc_struct)); +} ecere_gcc_struct __anon1; +} ecere_gcc_struct; void Compiler_Warning(const char * format, ...) { @@ -569,7 +572,7 @@ struct __ecereNameSpace__ecere__sys__OldList classes; struct __ecereNameSpace__ecere__sys__OldList functions; int importType; int importAccess; -} __attribute__ ((gcc_struct)); +} ecere_gcc_struct; struct ModuleImport * mainModule; @@ -590,7 +593,7 @@ struct DataRedefinition struct DataRedefinition * prev, * next; char name[1024]; char type1[1024], type2[1024]; -} __attribute__ ((gcc_struct)); +} ecere_gcc_struct; struct Definition; @@ -599,7 +602,7 @@ struct Definition struct Definition * prev, * next; char * name; int type; -} __attribute__ ((gcc_struct)); +} ecere_gcc_struct; struct ImportedModule; @@ -612,7 +615,7 @@ int importType; unsigned int globalInstance; unsigned int dllOnly; int importAccess; -} __attribute__ ((gcc_struct)); +} ecere_gcc_struct; struct FunctionImport; @@ -620,7 +623,7 @@ struct FunctionImport { struct FunctionImport * prev, * next; char * name; -} __attribute__ ((gcc_struct)); +} ecere_gcc_struct; struct PropertyImport; @@ -630,7 +633,7 @@ struct PropertyImport * prev, * next; char * name; unsigned int isVirtual; unsigned int hasSet, hasGet; -} __attribute__ ((gcc_struct)); +} ecere_gcc_struct; struct MethodImport; @@ -639,7 +642,7 @@ struct MethodImport struct MethodImport * prev, * next; char * name; unsigned int isVirtual; -} __attribute__ ((gcc_struct)); +} ecere_gcc_struct; struct __ecereNameSpace__ecere__com__Property; @@ -660,7 +663,7 @@ struct __ecereNameSpace__ecere__com__Instance void * * _vTbl; struct __ecereNameSpace__ecere__com__Class * _class; int _refCount; -} __attribute__ ((gcc_struct)); +} ecere_gcc_struct; extern long long __ecereNameSpace__ecere__com__eClass_GetProperty(struct __ecereNameSpace__ecere__com__Class * _class, const char * name); @@ -739,7 +742,7 @@ struct DBIndexItem struct DBIndexItem * prev, * next; struct Identifier * id; int order; -} __attribute__ ((gcc_struct)); +} ecere_gcc_struct; extern struct Identifier * CopyIdentifier(struct Identifier * id); @@ -755,7 +758,7 @@ struct TemplateDatatype { struct __ecereNameSpace__ecere__sys__OldList * specifiers; struct Declarator * decl; -} __attribute__ ((gcc_struct)); +} ecere_gcc_struct; extern struct Declarator * CopyDeclarator(struct Declarator * declarator); @@ -766,7 +769,7 @@ struct TopoEdge struct __ecereNameSpace__ecere__com__LinkElement in, out; struct External * from, * to; unsigned int breakable; -} __attribute__ ((gcc_struct)); +} ecere_gcc_struct; extern struct External * MkExternalDeclaration(struct Declaration * declaration); @@ -796,7 +799,7 @@ const char * category; unsigned int compiled; unsigned int selfWatchable; unsigned int isWatchable; -} __attribute__ ((gcc_struct)); +} ecere_gcc_struct; extern void DeclareTypeForwardDeclare(struct External * neededFor, struct Type * type, unsigned int needDereference, unsigned int forFunctionDef); @@ -822,7 +825,7 @@ struct __ecereNameSpace__ecere__sys__BTNode * root; int count; int (* CompareKey)(struct __ecereNameSpace__ecere__sys__BinaryTree * tree, uintptr_t a, uintptr_t b); void (* FreeKey)(void * key); -} __attribute__ ((gcc_struct)); +} ecere_gcc_struct; struct __ecereNameSpace__ecere__com__DataMember { @@ -844,7 +847,7 @@ struct __ecereNameSpace__ecere__sys__BinaryTree membersAlpha; int memberOffset; short structAlignment; short pointerAlignment; -} __attribute__ ((gcc_struct)); +} ecere_gcc_struct; int __ecereMethod___ecereNameSpace__ecere__sys__BinaryTree_CompareString(struct __ecereNameSpace__ecere__sys__BinaryTree * this, const char * a, const char * b); @@ -858,7 +861,7 @@ struct __ecereNameSpace__ecere__sys__BTNode * left; struct __ecereNameSpace__ecere__sys__BTNode * right; int depth; struct TemplateParameter * param; -} __attribute__ ((gcc_struct)); +} ecere_gcc_struct; extern struct Type * ProcessTemplateParameterType(struct TemplateParameter * param); @@ -879,7 +882,7 @@ char * name; struct Symbol * symbol; struct __ecereNameSpace__ecere__sys__OldList * templateArgs; struct Specifier * nsSpec; -} __attribute__ ((gcc_struct)) __anon1; +} ecere_gcc_struct __anon1; struct { struct Identifier * id; @@ -889,12 +892,12 @@ struct __ecereNameSpace__ecere__sys__OldList * definitions; unsigned int addNameSpace; struct Context * ctx; struct ExtDecl * extDeclStruct; -} __attribute__ ((gcc_struct)) __anon2; +} ecere_gcc_struct __anon2; struct Expression * expression; struct Specifier * _class; struct TemplateParameter * templateParameter; -} __attribute__ ((gcc_struct)) __anon1; -} __attribute__ ((gcc_struct)); +} ecere_gcc_struct __anon1; +} ecere_gcc_struct; struct DBTableDef { @@ -902,7 +905,7 @@ char * name; struct Symbol * symbol; struct __ecereNameSpace__ecere__sys__OldList * definitions; int declMode; -} __attribute__ ((gcc_struct)); +} ecere_gcc_struct; struct Identifier { @@ -912,7 +915,7 @@ struct Symbol * classSym; struct Specifier * _class; char * string; struct Identifier * badID; -} __attribute__ ((gcc_struct)); +} ecere_gcc_struct; struct ClassImport; @@ -924,7 +927,7 @@ struct __ecereNameSpace__ecere__sys__OldList methods; struct __ecereNameSpace__ecere__sys__OldList properties; unsigned int itself; int isRemote; -} __attribute__ ((gcc_struct)); +} ecere_gcc_struct; void Compiler_Error(const char * format, ...); @@ -946,7 +949,7 @@ struct Pointer * prev, * next; struct Location loc; struct __ecereNameSpace__ecere__sys__OldList * qualifiers; struct Pointer * pointer; -} __attribute__ ((gcc_struct)); +} ecere_gcc_struct; struct Declarator { @@ -963,26 +966,26 @@ struct struct Expression * exp; struct Expression * posExp; struct Attrib * attrib; -} __attribute__ ((gcc_struct)) structDecl; +} ecere_gcc_struct structDecl; struct { struct Expression * exp; struct Specifier * enumClass; -} __attribute__ ((gcc_struct)) array; +} ecere_gcc_struct array; struct { struct __ecereNameSpace__ecere__sys__OldList * parameters; -} __attribute__ ((gcc_struct)) function; +} ecere_gcc_struct function; struct { struct Pointer * pointer; -} __attribute__ ((gcc_struct)) pointer; +} ecere_gcc_struct pointer; struct { struct ExtDecl * extended; -} __attribute__ ((gcc_struct)) extended; -} __attribute__ ((gcc_struct)) __anon1; -} __attribute__ ((gcc_struct)); +} ecere_gcc_struct extended; +} ecere_gcc_struct __anon1; +} ecere_gcc_struct; struct MembersInit; @@ -1029,7 +1032,7 @@ unsigned int (* Sma)(struct Expression *, struct Operand *, struct Operand *); unsigned int (* GrtEqu)(struct Expression *, struct Operand *, struct Operand *); unsigned int (* SmaEqu)(struct Expression *, struct Operand *, struct Operand *); unsigned int (* Cond)(struct Expression *, struct Operand *, struct Operand *, struct Operand *); -} __attribute__ ((gcc_struct)); +} ecere_gcc_struct; struct Operand { @@ -1048,9 +1051,9 @@ float f; double d; long long i64; uint64 ui64; -} __attribute__ ((gcc_struct)) __anon1; +} ecere_gcc_struct __anon1; struct OpTable ops; -} __attribute__ ((gcc_struct)); +} ecere_gcc_struct; struct Attribute; @@ -1060,7 +1063,7 @@ struct Attribute * prev, * next; struct Location loc; char * attr; struct Expression * exp; -} __attribute__ ((gcc_struct)); +} ecere_gcc_struct; struct __ecereNameSpace__ecere__com__Method; @@ -1072,7 +1075,7 @@ struct { const char * dataTypeString; struct __ecereNameSpace__ecere__com__Class * dataTypeClass; -} __attribute__ ((gcc_struct)) __anon1; +} ecere_gcc_struct __anon1; struct __ecereNameSpace__ecere__com__DataValue expression; struct { @@ -1082,10 +1085,10 @@ union struct __ecereNameSpace__ecere__com__DataMember * member; struct __ecereNameSpace__ecere__com__Property * prop; struct __ecereNameSpace__ecere__com__Method * method; -} __attribute__ ((gcc_struct)) __anon1; -} __attribute__ ((gcc_struct)) __anon2; -} __attribute__ ((gcc_struct)) __anon1; -} __attribute__ ((gcc_struct)); +} ecere_gcc_struct __anon1; +} ecere_gcc_struct __anon2; +} ecere_gcc_struct __anon1; +} ecere_gcc_struct; struct Type { @@ -1098,7 +1101,7 @@ struct { struct __ecereNameSpace__ecere__sys__OldList members; char * enumName; -} __attribute__ ((gcc_struct)) __anon1; +} ecere_gcc_struct __anon1; struct { struct Type * returnType; @@ -1106,13 +1109,13 @@ struct __ecereNameSpace__ecere__sys__OldList params; struct Symbol * thisClass; unsigned int staticMethod; struct TemplateParameter * thisClassTemplate; -} __attribute__ ((gcc_struct)) __anon2; +} ecere_gcc_struct __anon2; struct { struct __ecereNameSpace__ecere__com__Method * method; struct __ecereNameSpace__ecere__com__Class * methodClass; struct __ecereNameSpace__ecere__com__Class * usedClass; -} __attribute__ ((gcc_struct)) __anon3; +} ecere_gcc_struct __anon3; struct { struct Type * arrayType; @@ -1120,10 +1123,10 @@ int arraySize; struct Expression * arraySizeExp; unsigned int freeExp; struct Symbol * enumClass; -} __attribute__ ((gcc_struct)) __anon4; +} ecere_gcc_struct __anon4; struct Type * type; struct TemplateParameter * templateParameter; -} __attribute__ ((gcc_struct)) __anon1; +} ecere_gcc_struct __anon1; int kind; unsigned int size; char * name; @@ -1150,7 +1153,7 @@ unsigned int typedByReference : 1; unsigned int casted : 1; unsigned int pointerAlignment : 1; unsigned int isLong : 1; -} __attribute__ ((gcc_struct)); +} ecere_gcc_struct; struct Symbol { @@ -1163,7 +1166,7 @@ union struct __ecereNameSpace__ecere__com__Method * method; struct __ecereNameSpace__ecere__com__Property * _property; struct __ecereNameSpace__ecere__com__Class * registered; -} __attribute__ ((gcc_struct)) __anon1; +} ecere_gcc_struct __anon1; unsigned int notYetDeclared; union { @@ -1171,20 +1174,20 @@ struct { struct External * pointerExternal; struct External * structExternal; -} __attribute__ ((gcc_struct)) __anon1; +} ecere_gcc_struct __anon1; struct { struct External * externalGet; struct External * externalSet; struct External * externalPtr; struct External * externalIsSet; -} __attribute__ ((gcc_struct)) __anon2; +} ecere_gcc_struct __anon2; struct { struct External * methodExternal; struct External * methodCodeExternal; -} __attribute__ ((gcc_struct)) __anon3; -} __attribute__ ((gcc_struct)) __anon2; +} ecere_gcc_struct __anon3; +} ecere_gcc_struct __anon2; unsigned int imported, declaredStructSym; struct __ecereNameSpace__ecere__com__Class * _class; unsigned int declaredStruct; @@ -1207,7 +1210,7 @@ struct Context * ctx; int isIterator; struct Expression * propCategory; unsigned int mustRegister; -} __attribute__ ((gcc_struct)); +} ecere_gcc_struct; struct __ecereNameSpace__ecere__com__Method { @@ -1224,7 +1227,7 @@ void * symbol; const char * dataTypeString; struct Type * dataType; int memberAccess; -} __attribute__ ((gcc_struct)); +} ecere_gcc_struct; extern struct __ecereNameSpace__ecere__com__Method * __ecereNameSpace__ecere__com__eClass_AddMethod(struct __ecereNameSpace__ecere__com__Class * _class, const char * name, const char * type, void * function, int declMode); @@ -1255,7 +1258,7 @@ char * dataTypeString; struct Type * dataType; void * symbol; char * fullName; -} __attribute__ ((gcc_struct)); +} ecere_gcc_struct; extern struct __ecereNameSpace__ecere__com__Instance * __thisModule; @@ -1286,10 +1289,10 @@ union { struct Expression * exp; struct __ecereNameSpace__ecere__sys__OldList * list; -} __attribute__ ((gcc_struct)) __anon1; +} ecere_gcc_struct __anon1; unsigned int isConstant; struct Identifier * id; -} __attribute__ ((gcc_struct)); +} ecere_gcc_struct; struct MemberInit { @@ -1301,7 +1304,7 @@ struct Initializer * initializer; unsigned int used; unsigned int variable; unsigned int takeOutExp; -} __attribute__ ((gcc_struct)); +} ecere_gcc_struct; struct Enumerator; @@ -1311,7 +1314,7 @@ struct Enumerator * prev, * next; struct Location loc; struct Identifier * id; struct Expression * exp; -} __attribute__ ((gcc_struct)); +} ecere_gcc_struct; struct AsmField; @@ -1322,7 +1325,7 @@ struct Location loc; char * command; struct Expression * expression; struct Identifier * symbolic; -} __attribute__ ((gcc_struct)); +} ecere_gcc_struct; struct DBTableEntry; @@ -1340,51 +1343,51 @@ struct { struct Identifier * id; struct Statement * stmt; -} __attribute__ ((gcc_struct)) labeled; +} ecere_gcc_struct labeled; struct { struct Expression * exp; struct Statement * stmt; -} __attribute__ ((gcc_struct)) caseStmt; +} ecere_gcc_struct caseStmt; struct { struct __ecereNameSpace__ecere__sys__OldList * declarations; struct __ecereNameSpace__ecere__sys__OldList * statements; struct Context * context; unsigned int isSwitch; -} __attribute__ ((gcc_struct)) compound; +} ecere_gcc_struct compound; struct { struct __ecereNameSpace__ecere__sys__OldList * exp; struct Statement * stmt; struct Statement * elseStmt; -} __attribute__ ((gcc_struct)) ifStmt; +} ecere_gcc_struct ifStmt; struct { struct __ecereNameSpace__ecere__sys__OldList * exp; struct Statement * stmt; -} __attribute__ ((gcc_struct)) switchStmt; +} ecere_gcc_struct switchStmt; struct { struct __ecereNameSpace__ecere__sys__OldList * exp; struct Statement * stmt; -} __attribute__ ((gcc_struct)) whileStmt; +} ecere_gcc_struct whileStmt; struct { struct __ecereNameSpace__ecere__sys__OldList * exp; struct Statement * stmt; -} __attribute__ ((gcc_struct)) doWhile; +} ecere_gcc_struct doWhile; struct { struct Statement * init; struct Statement * check; struct __ecereNameSpace__ecere__sys__OldList * increment; struct Statement * stmt; -} __attribute__ ((gcc_struct)) forStmt; +} ecere_gcc_struct forStmt; struct { struct Identifier * id; -} __attribute__ ((gcc_struct)) gotoStmt; +} ecere_gcc_struct gotoStmt; struct { struct Specifier * spec; @@ -1392,22 +1395,22 @@ char * statements; struct __ecereNameSpace__ecere__sys__OldList * inputFields; struct __ecereNameSpace__ecere__sys__OldList * outputFields; struct __ecereNameSpace__ecere__sys__OldList * clobberedFields; -} __attribute__ ((gcc_struct)) asmStmt; +} ecere_gcc_struct asmStmt; struct { struct Expression * watcher, * object; struct __ecereNameSpace__ecere__sys__OldList * watches; -} __attribute__ ((gcc_struct)) _watch; +} ecere_gcc_struct _watch; struct { struct Identifier * id; struct __ecereNameSpace__ecere__sys__OldList * exp; struct __ecereNameSpace__ecere__sys__OldList * filter; struct Statement * stmt; -} __attribute__ ((gcc_struct)) forEachStmt; +} ecere_gcc_struct forEachStmt; struct Declaration * decl; -} __attribute__ ((gcc_struct)) __anon1; -} __attribute__ ((gcc_struct)); +} ecere_gcc_struct __anon1; +} ecere_gcc_struct; struct PropertyWatch { @@ -1416,7 +1419,7 @@ struct Location loc; struct Statement * compound; struct __ecereNameSpace__ecere__sys__OldList * properties; unsigned int deleteWatch; -} __attribute__ ((gcc_struct)); +} ecere_gcc_struct; struct TypeName; @@ -1428,7 +1431,7 @@ struct __ecereNameSpace__ecere__sys__OldList * qualifiers; struct Declarator * declarator; int classObjectType; struct Expression * bitCount; -} __attribute__ ((gcc_struct)); +} ecere_gcc_struct; struct DBTableEntry { @@ -1441,10 +1444,10 @@ struct { struct TypeName * dataType; char * name; -} __attribute__ ((gcc_struct)) __anon1; +} ecere_gcc_struct __anon1; struct __ecereNameSpace__ecere__sys__OldList * items; -} __attribute__ ((gcc_struct)) __anon1; -} __attribute__ ((gcc_struct)); +} ecere_gcc_struct __anon1; +} ecere_gcc_struct; struct TemplateArgument; @@ -1459,8 +1462,8 @@ union struct Expression * expression; struct Identifier * identifier; struct TemplateDatatype * templateDatatype; -} __attribute__ ((gcc_struct)) __anon1; -} __attribute__ ((gcc_struct)); +} ecere_gcc_struct __anon1; +} ecere_gcc_struct; struct TemplateParameter { @@ -1472,11 +1475,11 @@ union { struct TemplateDatatype * dataType; int memberType; -} __attribute__ ((gcc_struct)) __anon1; +} ecere_gcc_struct __anon1; struct TemplateArgument * defaultArgument; const char * dataTypeString; struct Type * baseType; -} __attribute__ ((gcc_struct)); +} ecere_gcc_struct; struct __ecereNameSpace__ecere__com__NameSpace; @@ -1492,7 +1495,7 @@ struct __ecereNameSpace__ecere__sys__BinaryTree nameSpaces; struct __ecereNameSpace__ecere__sys__BinaryTree classes; struct __ecereNameSpace__ecere__sys__BinaryTree defines; struct __ecereNameSpace__ecere__sys__BinaryTree functions; -} __attribute__ ((gcc_struct)); +} ecere_gcc_struct; struct __ecereNameSpace__ecere__com__Class { @@ -1551,7 +1554,7 @@ struct __ecereNameSpace__ecere__sys__OldList templatized; int numParams; unsigned int isInstanceClass; unsigned int byValueSystemClass; -} __attribute__ ((gcc_struct)); +} ecere_gcc_struct; struct __ecereNameSpace__ecere__com__Application { @@ -1562,7 +1565,7 @@ unsigned int isGUIApp; struct __ecereNameSpace__ecere__sys__OldList allModules; char * parsedCommand; struct __ecereNameSpace__ecere__com__NameSpace systemNameSpace; -} __attribute__ ((gcc_struct)); +} ecere_gcc_struct; static struct __ecereNameSpace__ecere__com__Class * __ecereClass_TokenType; @@ -1823,7 +1826,7 @@ int importType; int origImportType; struct __ecereNameSpace__ecere__com__NameSpace privateNameSpace; struct __ecereNameSpace__ecere__com__NameSpace publicNameSpace; -} __attribute__ ((gcc_struct)); +} ecere_gcc_struct; void __ecereUnregisterModule_ecdefs(struct __ecereNameSpace__ecere__com__Instance * module) { @@ -1883,7 +1886,7 @@ struct Location blockStart; struct Location nameLoc; int declMode; unsigned int deleteWatchable; -} __attribute__ ((gcc_struct)); +} ecere_gcc_struct; struct Context { @@ -1898,7 +1901,7 @@ struct __ecereNameSpace__ecere__sys__BinaryTree templateTypes; struct ClassDefinition * classDef; unsigned int templateTypesOnly; unsigned int hasNameSpace; -} __attribute__ ((gcc_struct)); +} ecere_gcc_struct; unsigned int __ecereConstructor_Context(struct Context * this) { @@ -1925,7 +1928,7 @@ unsigned int isConstant; unsigned char * data; struct Location nameLoc, insideLoc; unsigned int built; -} __attribute__ ((gcc_struct)); +} ecere_gcc_struct; struct Declaration { @@ -1938,18 +1941,18 @@ struct { struct __ecereNameSpace__ecere__sys__OldList * specifiers; struct __ecereNameSpace__ecere__sys__OldList * declarators; -} __attribute__ ((gcc_struct)) __anon1; +} ecere_gcc_struct __anon1; struct Instantiation * inst; struct { struct Identifier * id; struct Expression * exp; -} __attribute__ ((gcc_struct)) __anon2; -} __attribute__ ((gcc_struct)) __anon1; +} ecere_gcc_struct __anon2; +} ecere_gcc_struct __anon1; struct Specifier * extStorage; struct Symbol * symbol; int declMode; -} __attribute__ ((gcc_struct)); +} ecere_gcc_struct; struct Expression { @@ -1962,7 +1965,7 @@ struct { char * constant; struct Identifier * identifier; -} __attribute__ ((gcc_struct)) __anon1; +} ecere_gcc_struct __anon1; struct Statement * compound; struct Instantiation * instance; struct @@ -1970,85 +1973,85 @@ struct char * string; unsigned int intlString; unsigned int wideString; -} __attribute__ ((gcc_struct)) __anon2; +} ecere_gcc_struct __anon2; struct __ecereNameSpace__ecere__sys__OldList * list; struct { struct __ecereNameSpace__ecere__sys__OldList * specifiers; struct Declarator * decl; -} __attribute__ ((gcc_struct)) _classExp; +} ecere_gcc_struct _classExp; struct { struct Identifier * id; -} __attribute__ ((gcc_struct)) classData; +} ecere_gcc_struct classData; struct { struct Expression * exp; struct __ecereNameSpace__ecere__sys__OldList * arguments; struct Location argLoc; -} __attribute__ ((gcc_struct)) call; +} ecere_gcc_struct call; struct { struct Expression * exp; struct __ecereNameSpace__ecere__sys__OldList * index; -} __attribute__ ((gcc_struct)) index; +} ecere_gcc_struct index; struct { struct Expression * exp; struct Identifier * member; int memberType; unsigned int thisPtr; -} __attribute__ ((gcc_struct)) member; +} ecere_gcc_struct member; struct { int op; struct Expression * exp1, * exp2; -} __attribute__ ((gcc_struct)) op; +} ecere_gcc_struct op; struct TypeName * typeName; struct Specifier * _class; struct { struct TypeName * typeName; struct Expression * exp; -} __attribute__ ((gcc_struct)) cast; +} ecere_gcc_struct cast; struct { struct Expression * cond; struct __ecereNameSpace__ecere__sys__OldList * exp; struct Expression * elseExp; -} __attribute__ ((gcc_struct)) cond; +} ecere_gcc_struct cond; struct { struct TypeName * typeName; struct Expression * size; -} __attribute__ ((gcc_struct)) _new; +} ecere_gcc_struct _new; struct { struct TypeName * typeName; struct Expression * size; struct Expression * exp; -} __attribute__ ((gcc_struct)) _renew; +} ecere_gcc_struct _renew; struct { char * table; struct Identifier * id; -} __attribute__ ((gcc_struct)) db; +} ecere_gcc_struct db; struct { struct Expression * ds; struct Expression * name; -} __attribute__ ((gcc_struct)) dbopen; +} ecere_gcc_struct dbopen; struct { struct TypeName * typeName; struct Initializer * initializer; -} __attribute__ ((gcc_struct)) initializer; +} ecere_gcc_struct initializer; struct { struct Expression * exp; struct TypeName * typeName; -} __attribute__ ((gcc_struct)) vaArg; -} __attribute__ ((gcc_struct)) __anon1; +} ecere_gcc_struct vaArg; +} ecere_gcc_struct __anon1; unsigned int debugValue; struct __ecereNameSpace__ecere__com__DataValue val; uint64 address; @@ -2064,7 +2067,7 @@ unsigned int needCast; unsigned int thisPtr; unsigned int opDestType; unsigned int needTemplateCast; -} __attribute__ ((gcc_struct)); +} ecere_gcc_struct; void __ecereMethod_Expression_Clear(struct Expression * this) { @@ -2112,7 +2115,7 @@ unsigned int isVirtual; unsigned int isConstructor, isDestructor; unsigned int dontMangle; int id, idCode; -} __attribute__ ((gcc_struct)); +} ecere_gcc_struct; struct MembersInit { @@ -2123,8 +2126,8 @@ union { struct __ecereNameSpace__ecere__sys__OldList * dataMembers; struct ClassFunction * function; -} __attribute__ ((gcc_struct)) __anon1; -} __attribute__ ((gcc_struct)); +} ecere_gcc_struct __anon1; +} ecere_gcc_struct; struct InitDeclarator; @@ -2134,7 +2137,7 @@ struct InitDeclarator * prev, * next; struct Location loc; struct Declarator * declarator; struct Initializer * initializer; -} __attribute__ ((gcc_struct)); +} ecere_gcc_struct; extern struct InitDeclarator * MkInitDeclarator(struct Declarator * declarator, struct Initializer * initializer); @@ -2155,7 +2158,7 @@ struct Type * type; struct Symbol * propSet; int tempCount; unsigned int propertyNoThis; -} __attribute__ ((gcc_struct)); +} ecere_gcc_struct; struct External { @@ -2171,13 +2174,13 @@ struct Declaration * declaration; char * importString; struct Identifier * id; struct DBTableDef * table; -} __attribute__ ((gcc_struct)) __anon1; +} ecere_gcc_struct __anon1; int importType; struct External * fwdDecl; struct __ecereNameSpace__ecere__com__Instance * outgoing; struct __ecereNameSpace__ecere__com__Instance * incoming; int nonBreakableIncoming; -} __attribute__ ((gcc_struct)); +} ecere_gcc_struct; unsigned int __ecereConstructor_External(struct External * this) { @@ -2303,8 +2306,8 @@ struct unsigned int conversion : 1; unsigned int isWatchable : 1; unsigned int isDBProp : 1; -} __attribute__ ((gcc_struct)) __anon1; -} __attribute__ ((gcc_struct)); +} ecere_gcc_struct __anon1; +} ecere_gcc_struct; struct ClassDef; @@ -2326,11 +2329,11 @@ struct { struct Identifier * id; struct Initializer * initializer; -} __attribute__ ((gcc_struct)) __anon1; -} __attribute__ ((gcc_struct)) __anon1; +} ecere_gcc_struct __anon1; +} ecere_gcc_struct __anon1; int memberAccess; void * object; -} __attribute__ ((gcc_struct)); +} ecere_gcc_struct; typedef union YYSTYPE { @@ -2372,7 +2375,7 @@ struct TemplateDatatype * templateDatatype; struct DBTableEntry * dbtableEntry; struct DBIndexItem * dbindexItem; struct DBTableDef * dbtableDef; -} __attribute__ ((gcc_struct)) YYSTYPE; +} ecere_gcc_struct YYSTYPE; extern YYSTYPE yylval; diff --git a/compiler/bootstrap/libec/bootstrap/expression.c b/compiler/bootstrap/libec/bootstrap/expression.c index 6f6ad03..0a36b6b 100644 --- a/compiler/bootstrap/libec/bootstrap/expression.c +++ b/compiler/bootstrap/libec/bootstrap/expression.c @@ -38,11 +38,14 @@ typedef unsigned __int64 uint64; #if defined(_WIN32) # if defined(__GNUC__) || defined(__TINYC__) # define ecere_stdcall __attribute__((__stdcall__)) +# define ecere_gcc_struct __attribute__((gcc_struct)) # else # define ecere_stdcall __stdcall +# define ecere_gcc_struct # endif #else # define ecere_stdcall +# define ecere_gcc_struct #endif #include #include @@ -214,7 +217,7 @@ void * last; int count; unsigned int offset; unsigned int circ; -} __attribute__ ((gcc_struct)); +} ecere_gcc_struct; struct __ecereNameSpace__ecere__sys__BTNode; @@ -235,8 +238,8 @@ float f; double d; long long i64; uint64 ui64; -} __attribute__ ((gcc_struct)) __anon1; -} __attribute__ ((gcc_struct)); +} ecere_gcc_struct __anon1; +} ecere_gcc_struct; struct __ecereNameSpace__ecere__com__SerialBuffer { @@ -244,7 +247,7 @@ unsigned char * _buffer; unsigned int count; unsigned int _size; unsigned int pos; -} __attribute__ ((gcc_struct)); +} ecere_gcc_struct; extern void * __ecereNameSpace__ecere__com__eSystem_New(unsigned int size); @@ -296,7 +299,7 @@ int line; int charPos; int pos; int included; -} __attribute__ ((gcc_struct)); +} ecere_gcc_struct; extern size_t strlen(const char * ); @@ -344,7 +347,7 @@ struct Location { struct CodePosition start; struct CodePosition end; -} __attribute__ ((gcc_struct)); +} ecere_gcc_struct; extern struct Location yylloc; @@ -355,7 +358,7 @@ struct Attrib struct Location loc; int type; struct __ecereNameSpace__ecere__sys__OldList * attribs; -} __attribute__ ((gcc_struct)); +} ecere_gcc_struct; extern void FreeAttrib(struct Attrib * attr); @@ -410,7 +413,7 @@ struct __ecereNameSpace__ecere__com__Instance void * * _vTbl; struct __ecereNameSpace__ecere__com__Class * _class; int _refCount; -} __attribute__ ((gcc_struct)); +} ecere_gcc_struct; extern long long __ecereNameSpace__ecere__com__eClass_GetProperty(struct __ecereNameSpace__ecere__com__Class * _class, const char * name); @@ -448,7 +451,7 @@ const char * category; unsigned int compiled; unsigned int selfWatchable; unsigned int isWatchable; -} __attribute__ ((gcc_struct)); +} ecere_gcc_struct; extern void __ecereNameSpace__ecere__com__eInstance_FireSelfWatchers(struct __ecereNameSpace__ecere__com__Instance * instance, struct __ecereNameSpace__ecere__com__Property * _property); @@ -493,7 +496,7 @@ struct Symbol * classSym; struct Specifier * _class; char * string; struct Identifier * badID; -} __attribute__ ((gcc_struct)); +} ecere_gcc_struct; extern struct Specifier * MkSpecifier(int specifier); @@ -523,7 +526,7 @@ char * name; struct Symbol * symbol; struct __ecereNameSpace__ecere__sys__OldList * templateArgs; struct Specifier * nsSpec; -} __attribute__ ((gcc_struct)) __anon1; +} ecere_gcc_struct __anon1; struct { struct Identifier * id; @@ -533,12 +536,12 @@ struct __ecereNameSpace__ecere__sys__OldList * definitions; unsigned int addNameSpace; struct Context * ctx; struct ExtDecl * extDeclStruct; -} __attribute__ ((gcc_struct)) __anon2; +} ecere_gcc_struct __anon2; struct Expression * expression; struct Specifier * _class; struct TemplateParameter * templateParameter; -} __attribute__ ((gcc_struct)) __anon1; -} __attribute__ ((gcc_struct)); +} ecere_gcc_struct __anon1; +} ecere_gcc_struct; extern struct Declaration * MkStructDeclaration(struct __ecereNameSpace__ecere__sys__OldList * specifiers, struct __ecereNameSpace__ecere__sys__OldList * declarators, struct Specifier * extStorage); @@ -561,7 +564,7 @@ struct Attribute * next; struct Location loc; char * attr; struct Expression * exp; -} __attribute__ ((gcc_struct)); +} ecere_gcc_struct; struct ClassDef; @@ -605,26 +608,26 @@ struct struct Expression * exp; struct Expression * posExp; struct Attrib * attrib; -} __attribute__ ((gcc_struct)) structDecl; +} ecere_gcc_struct structDecl; struct { struct Expression * exp; struct Specifier * enumClass; -} __attribute__ ((gcc_struct)) array; +} ecere_gcc_struct array; struct { struct __ecereNameSpace__ecere__sys__OldList * parameters; -} __attribute__ ((gcc_struct)) function; +} ecere_gcc_struct function; struct { struct Pointer * pointer; -} __attribute__ ((gcc_struct)) pointer; +} ecere_gcc_struct pointer; struct { struct ExtDecl * extended; -} __attribute__ ((gcc_struct)) extended; -} __attribute__ ((gcc_struct)) __anon1; -} __attribute__ ((gcc_struct)); +} ecere_gcc_struct extended; +} ecere_gcc_struct __anon1; +} ecere_gcc_struct; extern struct Declarator * MkDeclaratorBrackets(struct Declarator * declarator); @@ -653,7 +656,7 @@ struct InitDeclarator * next; struct Location loc; struct Declarator * declarator; struct Initializer * initializer; -} __attribute__ ((gcc_struct)); +} ecere_gcc_struct; struct Initializer { @@ -665,10 +668,10 @@ union { struct Expression * exp; struct __ecereNameSpace__ecere__sys__OldList * list; -} __attribute__ ((gcc_struct)) __anon1; +} ecere_gcc_struct __anon1; unsigned int isConstant; struct Identifier * id; -} __attribute__ ((gcc_struct)); +} ecere_gcc_struct; extern struct MemberInit * MkMemberInitExp(struct Expression * idExp, struct Initializer * initializer); @@ -683,7 +686,7 @@ struct Initializer * initializer; unsigned int used; unsigned int variable; unsigned int takeOutExp; -} __attribute__ ((gcc_struct)); +} ecere_gcc_struct; extern struct Initializer * MkInitializerAssignment(struct Expression * exp); @@ -715,8 +718,8 @@ struct unsigned int conversion : 1; unsigned int isWatchable : 1; unsigned int isDBProp : 1; -} __attribute__ ((gcc_struct)) __anon1; -} __attribute__ ((gcc_struct)); +} ecere_gcc_struct __anon1; +} ecere_gcc_struct; extern struct Statement * MkLabeledStmt(struct Identifier * id, struct Statement * statement); @@ -733,51 +736,51 @@ struct { struct Identifier * id; struct Statement * stmt; -} __attribute__ ((gcc_struct)) labeled; +} ecere_gcc_struct labeled; struct { struct Expression * exp; struct Statement * stmt; -} __attribute__ ((gcc_struct)) caseStmt; +} ecere_gcc_struct caseStmt; struct { struct __ecereNameSpace__ecere__sys__OldList * declarations; struct __ecereNameSpace__ecere__sys__OldList * statements; struct Context * context; unsigned int isSwitch; -} __attribute__ ((gcc_struct)) compound; +} ecere_gcc_struct compound; struct { struct __ecereNameSpace__ecere__sys__OldList * exp; struct Statement * stmt; struct Statement * elseStmt; -} __attribute__ ((gcc_struct)) ifStmt; +} ecere_gcc_struct ifStmt; struct { struct __ecereNameSpace__ecere__sys__OldList * exp; struct Statement * stmt; -} __attribute__ ((gcc_struct)) switchStmt; +} ecere_gcc_struct switchStmt; struct { struct __ecereNameSpace__ecere__sys__OldList * exp; struct Statement * stmt; -} __attribute__ ((gcc_struct)) whileStmt; +} ecere_gcc_struct whileStmt; struct { struct __ecereNameSpace__ecere__sys__OldList * exp; struct Statement * stmt; -} __attribute__ ((gcc_struct)) doWhile; +} ecere_gcc_struct doWhile; struct { struct Statement * init; struct Statement * check; struct __ecereNameSpace__ecere__sys__OldList * increment; struct Statement * stmt; -} __attribute__ ((gcc_struct)) forStmt; +} ecere_gcc_struct forStmt; struct { struct Identifier * id; -} __attribute__ ((gcc_struct)) gotoStmt; +} ecere_gcc_struct gotoStmt; struct { struct Specifier * spec; @@ -785,23 +788,23 @@ char * statements; struct __ecereNameSpace__ecere__sys__OldList * inputFields; struct __ecereNameSpace__ecere__sys__OldList * outputFields; struct __ecereNameSpace__ecere__sys__OldList * clobberedFields; -} __attribute__ ((gcc_struct)) asmStmt; +} ecere_gcc_struct asmStmt; struct { struct Expression * watcher; struct Expression * object; struct __ecereNameSpace__ecere__sys__OldList * watches; -} __attribute__ ((gcc_struct)) _watch; +} ecere_gcc_struct _watch; struct { struct Identifier * id; struct __ecereNameSpace__ecere__sys__OldList * exp; struct __ecereNameSpace__ecere__sys__OldList * filter; struct Statement * stmt; -} __attribute__ ((gcc_struct)) forEachStmt; +} ecere_gcc_struct forEachStmt; struct Declaration * decl; -} __attribute__ ((gcc_struct)) __anon1; -} __attribute__ ((gcc_struct)); +} ecere_gcc_struct __anon1; +} ecere_gcc_struct; extern struct Statement * MkCaseStmt(struct Expression * exp, struct Statement * statement); @@ -845,7 +848,7 @@ struct { char * constant; struct Identifier * identifier; -} __attribute__ ((gcc_struct)) __anon1; +} ecere_gcc_struct __anon1; struct Statement * compound; struct Instantiation * instance; struct @@ -853,86 +856,86 @@ struct char * string; unsigned int intlString; unsigned int wideString; -} __attribute__ ((gcc_struct)) __anon2; +} ecere_gcc_struct __anon2; struct __ecereNameSpace__ecere__sys__OldList * list; struct { struct __ecereNameSpace__ecere__sys__OldList * specifiers; struct Declarator * decl; -} __attribute__ ((gcc_struct)) _classExp; +} ecere_gcc_struct _classExp; struct { struct Identifier * id; -} __attribute__ ((gcc_struct)) classData; +} ecere_gcc_struct classData; struct { struct Expression * exp; struct __ecereNameSpace__ecere__sys__OldList * arguments; struct Location argLoc; -} __attribute__ ((gcc_struct)) call; +} ecere_gcc_struct call; struct { struct Expression * exp; struct __ecereNameSpace__ecere__sys__OldList * index; -} __attribute__ ((gcc_struct)) index; +} ecere_gcc_struct index; struct { struct Expression * exp; struct Identifier * member; int memberType; unsigned int thisPtr; -} __attribute__ ((gcc_struct)) member; +} ecere_gcc_struct member; struct { int op; struct Expression * exp1; struct Expression * exp2; -} __attribute__ ((gcc_struct)) op; +} ecere_gcc_struct op; struct TypeName * typeName; struct Specifier * _class; struct { struct TypeName * typeName; struct Expression * exp; -} __attribute__ ((gcc_struct)) cast; +} ecere_gcc_struct cast; struct { struct Expression * cond; struct __ecereNameSpace__ecere__sys__OldList * exp; struct Expression * elseExp; -} __attribute__ ((gcc_struct)) cond; +} ecere_gcc_struct cond; struct { struct TypeName * typeName; struct Expression * size; -} __attribute__ ((gcc_struct)) _new; +} ecere_gcc_struct _new; struct { struct TypeName * typeName; struct Expression * size; struct Expression * exp; -} __attribute__ ((gcc_struct)) _renew; +} ecere_gcc_struct _renew; struct { char * table; struct Identifier * id; -} __attribute__ ((gcc_struct)) db; +} ecere_gcc_struct db; struct { struct Expression * ds; struct Expression * name; -} __attribute__ ((gcc_struct)) dbopen; +} ecere_gcc_struct dbopen; struct { struct TypeName * typeName; struct Initializer * initializer; -} __attribute__ ((gcc_struct)) initializer; +} ecere_gcc_struct initializer; struct { struct Expression * exp; struct TypeName * typeName; -} __attribute__ ((gcc_struct)) vaArg; -} __attribute__ ((gcc_struct)) __anon1; +} ecere_gcc_struct vaArg; +} ecere_gcc_struct __anon1; unsigned int debugValue; struct __ecereNameSpace__ecere__com__DataValue val; uint64 address; @@ -948,7 +951,7 @@ unsigned int needCast; unsigned int thisPtr; unsigned int opDestType; unsigned int needTemplateCast; -} __attribute__ ((gcc_struct)); +} ecere_gcc_struct; extern struct Expression * MkExpInstance(struct Instantiation * inst); @@ -964,18 +967,18 @@ struct { struct __ecereNameSpace__ecere__sys__OldList * specifiers; struct __ecereNameSpace__ecere__sys__OldList * declarators; -} __attribute__ ((gcc_struct)) __anon1; +} ecere_gcc_struct __anon1; struct Instantiation * inst; struct { struct Identifier * id; struct Expression * exp; -} __attribute__ ((gcc_struct)) __anon2; -} __attribute__ ((gcc_struct)) __anon1; +} ecere_gcc_struct __anon2; +} ecere_gcc_struct __anon1; struct Specifier * extStorage; struct Symbol * symbol; int declMode; -} __attribute__ ((gcc_struct)); +} ecere_gcc_struct; extern struct Declaration * MkDeclarationInst(struct Instantiation * inst); @@ -998,7 +1001,7 @@ unsigned char * data; struct Location nameLoc; struct Location insideLoc; unsigned int built; -} __attribute__ ((gcc_struct)); +} ecere_gcc_struct; extern struct Instantiation * MkInstantiation(struct Specifier * _class, struct Expression * exp, struct __ecereNameSpace__ecere__sys__OldList * members); @@ -1025,11 +1028,11 @@ struct { struct Identifier * id; struct Initializer * initializer; -} __attribute__ ((gcc_struct)) __anon1; -} __attribute__ ((gcc_struct)) __anon1; +} ecere_gcc_struct __anon1; +} ecere_gcc_struct __anon1; int memberAccess; void * object; -} __attribute__ ((gcc_struct)); +} ecere_gcc_struct; extern struct ClassDef * MkClassDefFunction(struct ClassFunction * function); @@ -1055,7 +1058,7 @@ unsigned int isDestructor; unsigned int dontMangle; int id; int idCode; -} __attribute__ ((gcc_struct)); +} ecere_gcc_struct; extern void ProcessClassFunctionBody(struct ClassFunction * func, struct Statement * body); @@ -1101,7 +1104,7 @@ struct TemplateDatatype * templateDatatype; struct DBTableEntry * dbtableEntry; struct DBIndexItem * dbindexItem; struct DBTableDef * dbtableDef; -} __attribute__ ((gcc_struct)) YYSTYPE; +} ecere_gcc_struct YYSTYPE; extern YYSTYPE yylval; @@ -1110,7 +1113,7 @@ union yyalloc yytype_int16 yyss_alloc; YYSTYPE yyvs_alloc; struct Location yyls_alloc; -} __attribute__ ((gcc_struct)); +} ecere_gcc_struct; static void yy_symbol_value_print(FILE * yyoutput, int yytype, YYSTYPE const * const yyvaluep, struct Location const * const yylocationp) { @@ -1141,8 +1144,8 @@ union { struct __ecereNameSpace__ecere__sys__OldList * dataMembers; struct ClassFunction * function; -} __attribute__ ((gcc_struct)) __anon1; -} __attribute__ ((gcc_struct)); +} ecere_gcc_struct __anon1; +} ecere_gcc_struct; extern struct MembersInit * MkMembersInitMethod(struct ClassFunction * function); @@ -1181,7 +1184,7 @@ struct __ecereNameSpace__ecere__sys__BTNode * root; int count; int (* CompareKey)(struct __ecereNameSpace__ecere__sys__BinaryTree * tree, uintptr_t a, uintptr_t b); void (* FreeKey)(void * key); -} __attribute__ ((gcc_struct)); +} ecere_gcc_struct; struct __ecereNameSpace__ecere__com__Method; @@ -1200,7 +1203,7 @@ void * symbol; const char * dataTypeString; struct Type * dataType; int memberAccess; -} __attribute__ ((gcc_struct)); +} ecere_gcc_struct; static void yydestruct(const char * yymsg, int yytype, YYSTYPE * yyvaluep, struct Location * yylocationp); @@ -4241,7 +4244,7 @@ struct __ecereNameSpace__ecere__sys__BinaryTree nameSpaces; struct __ecereNameSpace__ecere__sys__BinaryTree classes; struct __ecereNameSpace__ecere__sys__BinaryTree defines; struct __ecereNameSpace__ecere__sys__BinaryTree functions; -} __attribute__ ((gcc_struct)); +} ecere_gcc_struct; struct __ecereNameSpace__ecere__com__Application { @@ -4252,7 +4255,7 @@ unsigned int isGUIApp; struct __ecereNameSpace__ecere__sys__OldList allModules; char * parsedCommand; struct __ecereNameSpace__ecere__com__NameSpace systemNameSpace; -} __attribute__ ((gcc_struct)); +} ecere_gcc_struct; struct __ecereNameSpace__ecere__com__DataMember; @@ -4264,7 +4267,7 @@ struct { const char * dataTypeString; struct __ecereNameSpace__ecere__com__Class * dataTypeClass; -} __attribute__ ((gcc_struct)) __anon1; +} ecere_gcc_struct __anon1; struct __ecereNameSpace__ecere__com__DataValue expression; struct { @@ -4274,10 +4277,10 @@ union struct __ecereNameSpace__ecere__com__DataMember * member; struct __ecereNameSpace__ecere__com__Property * prop; struct __ecereNameSpace__ecere__com__Method * method; -} __attribute__ ((gcc_struct)) __anon1; -} __attribute__ ((gcc_struct)) __anon2; -} __attribute__ ((gcc_struct)) __anon1; -} __attribute__ ((gcc_struct)); +} ecere_gcc_struct __anon1; +} ecere_gcc_struct __anon2; +} ecere_gcc_struct __anon1; +} ecere_gcc_struct; struct __ecereNameSpace__ecere__com__DataMember { @@ -4299,7 +4302,7 @@ struct __ecereNameSpace__ecere__sys__BinaryTree membersAlpha; int memberOffset; short structAlignment; short pointerAlignment; -} __attribute__ ((gcc_struct)); +} ecere_gcc_struct; struct __ecereNameSpace__ecere__com__Module; @@ -4319,7 +4322,7 @@ int importType; int origImportType; struct __ecereNameSpace__ecere__com__NameSpace privateNameSpace; struct __ecereNameSpace__ecere__com__NameSpace publicNameSpace; -} __attribute__ ((gcc_struct)); +} ecere_gcc_struct; struct __ecereNameSpace__ecere__com__Class { @@ -4378,7 +4381,7 @@ struct __ecereNameSpace__ecere__sys__OldList templatized; int numParams; unsigned int isInstanceClass; unsigned int byValueSystemClass; -} __attribute__ ((gcc_struct)); +} ecere_gcc_struct; void __ecereRegisterModule_expression(struct __ecereNameSpace__ecere__com__Instance * module) { diff --git a/compiler/bootstrap/libec/bootstrap/firstPass.c b/compiler/bootstrap/libec/bootstrap/firstPass.c index bb763ad..ae7557f 100644 --- a/compiler/bootstrap/libec/bootstrap/firstPass.c +++ b/compiler/bootstrap/libec/bootstrap/firstPass.c @@ -38,11 +38,14 @@ typedef unsigned __int64 uint64; #if defined(_WIN32) # if defined(__GNUC__) || defined(__TINYC__) # define ecere_stdcall __attribute__((__stdcall__)) +# define ecere_gcc_struct __attribute__((gcc_struct)) # else # define ecere_stdcall __stdcall +# define ecere_gcc_struct # endif #else # define ecere_stdcall +# define ecere_gcc_struct #endif #include #include @@ -62,7 +65,7 @@ void * last; int count; unsigned int offset; unsigned int circ; -} __attribute__ ((gcc_struct)); +} ecere_gcc_struct; struct __ecereNameSpace__ecere__sys__BTNode; @@ -81,8 +84,8 @@ float f; double d; long long i64; uint64 ui64; -} __attribute__ ((gcc_struct)) __anon1; -} __attribute__ ((gcc_struct)); +} ecere_gcc_struct __anon1; +} ecere_gcc_struct; struct __ecereNameSpace__ecere__com__SerialBuffer { @@ -90,7 +93,7 @@ unsigned char * _buffer; unsigned int count; unsigned int _size; unsigned int pos; -} __attribute__ ((gcc_struct)); +} ecere_gcc_struct; extern void * __ecereNameSpace__ecere__com__eSystem_New(unsigned int size); @@ -142,7 +145,7 @@ int line; int charPos; int pos; int included; -} __attribute__ ((gcc_struct)); +} ecere_gcc_struct; extern int strtol(const char * , char * * , int base); @@ -171,7 +174,7 @@ struct __ecereNameSpace__ecere__com__LinkList void * first; void * last; int count; -} __attribute__ ((gcc_struct)); +} ecere_gcc_struct; struct __ecereNameSpace__ecere__com__GlobalFunction; @@ -189,7 +192,7 @@ struct Location { struct CodePosition start; struct CodePosition end; -} __attribute__ ((gcc_struct)); +} ecere_gcc_struct; extern struct ModuleImport * mainModule; @@ -218,7 +221,7 @@ struct __ecereNameSpace__ecere__com__Instance void * * _vTbl; struct __ecereNameSpace__ecere__com__Class * _class; int _refCount; -} __attribute__ ((gcc_struct)); +} ecere_gcc_struct; extern long long __ecereNameSpace__ecere__com__eClass_GetProperty(struct __ecereNameSpace__ecere__com__Class * _class, const char * name); @@ -258,7 +261,7 @@ struct TemplateDatatype { struct __ecereNameSpace__ecere__sys__OldList * specifiers; struct Declarator * decl; -} __attribute__ ((gcc_struct)); +} ecere_gcc_struct; struct Type; @@ -286,7 +289,7 @@ const char * category; unsigned int compiled; unsigned int selfWatchable; unsigned int isWatchable; -} __attribute__ ((gcc_struct)); +} ecere_gcc_struct; extern struct Type * ProcessType(struct __ecereNameSpace__ecere__sys__OldList * specs, struct Declarator * decl); @@ -323,7 +326,7 @@ struct __ecereNameSpace__ecere__sys__OldLink struct __ecereNameSpace__ecere__sys__OldLink * prev; struct __ecereNameSpace__ecere__sys__OldLink * next; void * data; -} __attribute__ ((gcc_struct)); +} ecere_gcc_struct; struct __ecereNameSpace__ecere__sys__BinaryTree; @@ -333,7 +336,7 @@ struct __ecereNameSpace__ecere__sys__BTNode * root; int count; int (* CompareKey)(struct __ecereNameSpace__ecere__sys__BinaryTree * tree, uintptr_t a, uintptr_t b); void (* FreeKey)(void * key); -} __attribute__ ((gcc_struct)); +} ecere_gcc_struct; struct __ecereNameSpace__ecere__com__DataMember { @@ -355,7 +358,7 @@ struct __ecereNameSpace__ecere__sys__BinaryTree membersAlpha; int memberOffset; short structAlignment; short pointerAlignment; -} __attribute__ ((gcc_struct)); +} ecere_gcc_struct; void __ecereMethod___ecereNameSpace__ecere__sys__BinaryTree_Remove(struct __ecereNameSpace__ecere__sys__BinaryTree * this, struct __ecereNameSpace__ecere__sys__BTNode * node); @@ -400,7 +403,7 @@ unsigned int (* Sma)(struct Expression *, struct Operand *, struct Operand *); unsigned int (* GrtEqu)(struct Expression *, struct Operand *, struct Operand *); unsigned int (* SmaEqu)(struct Expression *, struct Operand *, struct Operand *); unsigned int (* Cond)(struct Expression *, struct Operand *, struct Operand *, struct Operand *); -} __attribute__ ((gcc_struct)); +} ecere_gcc_struct; struct Operand { @@ -419,9 +422,9 @@ float f; double d; long long i64; uint64 ui64; -} __attribute__ ((gcc_struct)) __anon1; +} ecere_gcc_struct __anon1; struct OpTable ops; -} __attribute__ ((gcc_struct)); +} ecere_gcc_struct; extern struct Operand GetOperand(struct Expression * exp); @@ -445,7 +448,7 @@ int type; int size; int pos; uint64 mask; -} __attribute__ ((gcc_struct)); +} ecere_gcc_struct; struct __ecereNameSpace__ecere__com__Method; @@ -457,7 +460,7 @@ struct { const char * dataTypeString; struct __ecereNameSpace__ecere__com__Class * dataTypeClass; -} __attribute__ ((gcc_struct)) __anon1; +} ecere_gcc_struct __anon1; struct __ecereNameSpace__ecere__com__DataValue expression; struct { @@ -467,10 +470,10 @@ union struct __ecereNameSpace__ecere__com__DataMember * member; struct __ecereNameSpace__ecere__com__Property * prop; struct __ecereNameSpace__ecere__com__Method * method; -} __attribute__ ((gcc_struct)) __anon1; -} __attribute__ ((gcc_struct)) __anon2; -} __attribute__ ((gcc_struct)) __anon1; -} __attribute__ ((gcc_struct)); +} ecere_gcc_struct __anon1; +} ecere_gcc_struct __anon2; +} ecere_gcc_struct __anon1; +} ecere_gcc_struct; struct __ecereNameSpace__ecere__com__Method { @@ -487,7 +490,7 @@ void * symbol; const char * dataTypeString; struct Type * dataType; int memberAccess; -} __attribute__ ((gcc_struct)); +} ecere_gcc_struct; struct Symbol { @@ -502,7 +505,7 @@ union struct __ecereNameSpace__ecere__com__Method * method; struct __ecereNameSpace__ecere__com__Property * _property; struct __ecereNameSpace__ecere__com__Class * registered; -} __attribute__ ((gcc_struct)) __anon1; +} ecere_gcc_struct __anon1; unsigned int notYetDeclared; union { @@ -510,20 +513,20 @@ struct { struct External * pointerExternal; struct External * structExternal; -} __attribute__ ((gcc_struct)) __anon1; +} ecere_gcc_struct __anon1; struct { struct External * externalGet; struct External * externalSet; struct External * externalPtr; struct External * externalIsSet; -} __attribute__ ((gcc_struct)) __anon2; +} ecere_gcc_struct __anon2; struct { struct External * methodExternal; struct External * methodCodeExternal; -} __attribute__ ((gcc_struct)) __anon3; -} __attribute__ ((gcc_struct)) __anon2; +} ecere_gcc_struct __anon3; +} ecere_gcc_struct __anon2; unsigned int imported; unsigned int declaredStructSym; struct __ecereNameSpace__ecere__com__Class * _class; @@ -551,7 +554,7 @@ struct Context * ctx; int isIterator; struct Expression * propCategory; unsigned int mustRegister; -} __attribute__ ((gcc_struct)); +} ecere_gcc_struct; extern struct __ecereNameSpace__ecere__com__Method * __ecereNameSpace__ecere__com__eClass_AddVirtualMethod(struct __ecereNameSpace__ecere__com__Class * _class, const char * name, const char * type, void * function, int declMode); @@ -587,26 +590,26 @@ struct struct Expression * exp; struct Expression * posExp; struct Attrib * attrib; -} __attribute__ ((gcc_struct)) structDecl; +} ecere_gcc_struct structDecl; struct { struct Expression * exp; struct Specifier * enumClass; -} __attribute__ ((gcc_struct)) array; +} ecere_gcc_struct array; struct { struct __ecereNameSpace__ecere__sys__OldList * parameters; -} __attribute__ ((gcc_struct)) function; +} ecere_gcc_struct function; struct { struct Pointer * pointer; -} __attribute__ ((gcc_struct)) pointer; +} ecere_gcc_struct pointer; struct { struct ExtDecl * extended; -} __attribute__ ((gcc_struct)) extended; -} __attribute__ ((gcc_struct)) __anon1; -} __attribute__ ((gcc_struct)); +} ecere_gcc_struct extended; +} ecere_gcc_struct __anon1; +} ecere_gcc_struct; extern struct Identifier * GetDeclId(struct Declarator * decl); @@ -619,7 +622,7 @@ struct Symbol * classSym; struct Specifier * _class; char * string; struct Identifier * badID; -} __attribute__ ((gcc_struct)); +} ecere_gcc_struct; extern struct Declarator * MkDeclaratorIdentifier(struct Identifier * id); @@ -637,7 +640,7 @@ struct { char * constant; struct Identifier * identifier; -} __attribute__ ((gcc_struct)) __anon1; +} ecere_gcc_struct __anon1; struct Statement * compound; struct Instantiation * instance; struct @@ -645,86 +648,86 @@ struct char * string; unsigned int intlString; unsigned int wideString; -} __attribute__ ((gcc_struct)) __anon2; +} ecere_gcc_struct __anon2; struct __ecereNameSpace__ecere__sys__OldList * list; struct { struct __ecereNameSpace__ecere__sys__OldList * specifiers; struct Declarator * decl; -} __attribute__ ((gcc_struct)) _classExp; +} ecere_gcc_struct _classExp; struct { struct Identifier * id; -} __attribute__ ((gcc_struct)) classData; +} ecere_gcc_struct classData; struct { struct Expression * exp; struct __ecereNameSpace__ecere__sys__OldList * arguments; struct Location argLoc; -} __attribute__ ((gcc_struct)) call; +} ecere_gcc_struct call; struct { struct Expression * exp; struct __ecereNameSpace__ecere__sys__OldList * index; -} __attribute__ ((gcc_struct)) index; +} ecere_gcc_struct index; struct { struct Expression * exp; struct Identifier * member; int memberType; unsigned int thisPtr; -} __attribute__ ((gcc_struct)) member; +} ecere_gcc_struct member; struct { int op; struct Expression * exp1; struct Expression * exp2; -} __attribute__ ((gcc_struct)) op; +} ecere_gcc_struct op; struct TypeName * typeName; struct Specifier * _class; struct { struct TypeName * typeName; struct Expression * exp; -} __attribute__ ((gcc_struct)) cast; +} ecere_gcc_struct cast; struct { struct Expression * cond; struct __ecereNameSpace__ecere__sys__OldList * exp; struct Expression * elseExp; -} __attribute__ ((gcc_struct)) cond; +} ecere_gcc_struct cond; struct { struct TypeName * typeName; struct Expression * size; -} __attribute__ ((gcc_struct)) _new; +} ecere_gcc_struct _new; struct { struct TypeName * typeName; struct Expression * size; struct Expression * exp; -} __attribute__ ((gcc_struct)) _renew; +} ecere_gcc_struct _renew; struct { char * table; struct Identifier * id; -} __attribute__ ((gcc_struct)) db; +} ecere_gcc_struct db; struct { struct Expression * ds; struct Expression * name; -} __attribute__ ((gcc_struct)) dbopen; +} ecere_gcc_struct dbopen; struct { struct TypeName * typeName; struct Initializer * initializer; -} __attribute__ ((gcc_struct)) initializer; +} ecere_gcc_struct initializer; struct { struct Expression * exp; struct TypeName * typeName; -} __attribute__ ((gcc_struct)) vaArg; -} __attribute__ ((gcc_struct)) __anon1; +} ecere_gcc_struct vaArg; +} ecere_gcc_struct __anon1; unsigned int debugValue; struct __ecereNameSpace__ecere__com__DataValue val; uint64 address; @@ -740,7 +743,7 @@ unsigned int needCast; unsigned int thisPtr; unsigned int opDestType; unsigned int needTemplateCast; -} __attribute__ ((gcc_struct)); +} ecere_gcc_struct; struct Instantiation { @@ -757,7 +760,7 @@ unsigned char * data; struct Location nameLoc; struct Location insideLoc; unsigned int built; -} __attribute__ ((gcc_struct)); +} ecere_gcc_struct; struct ClassFunction; @@ -781,7 +784,7 @@ unsigned int isDestructor; unsigned int dontMangle; int id; int idCode; -} __attribute__ ((gcc_struct)); +} ecere_gcc_struct; struct ClassDefinition; @@ -798,7 +801,7 @@ struct __ecereNameSpace__ecere__sys__BinaryTree templateTypes; struct ClassDefinition * classDef; unsigned int templateTypesOnly; unsigned int hasNameSpace; -} __attribute__ ((gcc_struct)); +} ecere_gcc_struct; struct ClassDefinition { @@ -813,7 +816,7 @@ struct Location blockStart; struct Location nameLoc; int declMode; unsigned int deleteWatchable; -} __attribute__ ((gcc_struct)); +} ecere_gcc_struct; struct __ecereNameSpace__ecere__com__NameSpace; @@ -829,7 +832,7 @@ struct __ecereNameSpace__ecere__sys__BinaryTree nameSpaces; struct __ecereNameSpace__ecere__sys__BinaryTree classes; struct __ecereNameSpace__ecere__sys__BinaryTree defines; struct __ecereNameSpace__ecere__sys__BinaryTree functions; -} __attribute__ ((gcc_struct)); +} ecere_gcc_struct; struct __ecereNameSpace__ecere__com__Class { @@ -888,7 +891,7 @@ struct __ecereNameSpace__ecere__sys__OldList templatized; int numParams; unsigned int isInstanceClass; unsigned int byValueSystemClass; -} __attribute__ ((gcc_struct)); +} ecere_gcc_struct; struct __ecereNameSpace__ecere__com__Application { @@ -899,7 +902,7 @@ unsigned int isGUIApp; struct __ecereNameSpace__ecere__sys__OldList allModules; char * parsedCommand; struct __ecereNameSpace__ecere__com__NameSpace systemNameSpace; -} __attribute__ ((gcc_struct)); +} ecere_gcc_struct; extern struct __ecereNameSpace__ecere__com__Class * __ecereClass_Type; @@ -921,7 +924,7 @@ int importType; int origImportType; struct __ecereNameSpace__ecere__com__NameSpace privateNameSpace; struct __ecereNameSpace__ecere__com__NameSpace publicNameSpace; -} __attribute__ ((gcc_struct)); +} ecere_gcc_struct; void __ecereUnregisterModule_firstPass(struct __ecereNameSpace__ecere__com__Instance * module) { @@ -946,7 +949,7 @@ char * name; struct Symbol * symbol; struct __ecereNameSpace__ecere__sys__OldList * templateArgs; struct Specifier * nsSpec; -} __attribute__ ((gcc_struct)) __anon1; +} ecere_gcc_struct __anon1; struct { struct Identifier * id; @@ -956,12 +959,12 @@ struct __ecereNameSpace__ecere__sys__OldList * definitions; unsigned int addNameSpace; struct Context * ctx; struct ExtDecl * extDeclStruct; -} __attribute__ ((gcc_struct)) __anon2; +} ecere_gcc_struct __anon2; struct Expression * expression; struct Specifier * _class; struct TemplateParameter * templateParameter; -} __attribute__ ((gcc_struct)) __anon1; -} __attribute__ ((gcc_struct)); +} ecere_gcc_struct __anon1; +} ecere_gcc_struct; struct Type { @@ -975,7 +978,7 @@ struct { struct __ecereNameSpace__ecere__sys__OldList members; char * enumName; -} __attribute__ ((gcc_struct)) __anon1; +} ecere_gcc_struct __anon1; struct { struct Type * returnType; @@ -983,13 +986,13 @@ struct __ecereNameSpace__ecere__sys__OldList params; struct Symbol * thisClass; unsigned int staticMethod; struct TemplateParameter * thisClassTemplate; -} __attribute__ ((gcc_struct)) __anon2; +} ecere_gcc_struct __anon2; struct { struct __ecereNameSpace__ecere__com__Method * method; struct __ecereNameSpace__ecere__com__Class * methodClass; struct __ecereNameSpace__ecere__com__Class * usedClass; -} __attribute__ ((gcc_struct)) __anon3; +} ecere_gcc_struct __anon3; struct { struct Type * arrayType; @@ -997,10 +1000,10 @@ int arraySize; struct Expression * arraySizeExp; unsigned int freeExp; struct Symbol * enumClass; -} __attribute__ ((gcc_struct)) __anon4; +} ecere_gcc_struct __anon4; struct Type * type; struct TemplateParameter * templateParameter; -} __attribute__ ((gcc_struct)) __anon1; +} ecere_gcc_struct __anon1; int kind; unsigned int size; char * name; @@ -1027,7 +1030,7 @@ unsigned int typedByReference : 1; unsigned int casted : 1; unsigned int pointerAlignment : 1; unsigned int isLong : 1; -} __attribute__ ((gcc_struct)); +} ecere_gcc_struct; struct PropertyDef; @@ -1049,8 +1052,8 @@ struct unsigned int conversion : 1; unsigned int isWatchable : 1; unsigned int isDBProp : 1; -} __attribute__ ((gcc_struct)) __anon1; -} __attribute__ ((gcc_struct)); +} ecere_gcc_struct __anon1; +} ecere_gcc_struct; struct TemplateArgument; @@ -1065,11 +1068,11 @@ union { struct TemplateDatatype * dataType; int memberType; -} __attribute__ ((gcc_struct)) __anon1; +} ecere_gcc_struct __anon1; struct TemplateArgument * defaultArgument; const char * dataTypeString; struct Type * baseType; -} __attribute__ ((gcc_struct)); +} ecere_gcc_struct; struct TemplateArgument { @@ -1083,8 +1086,8 @@ union struct Expression * expression; struct Identifier * identifier; struct TemplateDatatype * templateDatatype; -} __attribute__ ((gcc_struct)) __anon1; -} __attribute__ ((gcc_struct)); +} ecere_gcc_struct __anon1; +} ecere_gcc_struct; struct Declaration; @@ -1128,7 +1131,7 @@ struct TemplateDatatype * templateDatatype; struct DBTableEntry * dbtableEntry; struct DBIndexItem * dbindexItem; struct DBTableDef * dbtableDef; -} __attribute__ ((gcc_struct)) YYSTYPE; +} ecere_gcc_struct YYSTYPE; extern YYSTYPE yylval; @@ -1151,11 +1154,11 @@ struct { struct Identifier * id; struct Initializer * initializer; -} __attribute__ ((gcc_struct)) __anon1; -} __attribute__ ((gcc_struct)) __anon1; +} ecere_gcc_struct __anon1; +} ecere_gcc_struct __anon1; int memberAccess; void * object; -} __attribute__ ((gcc_struct)); +} ecere_gcc_struct; struct Declaration { @@ -1169,18 +1172,18 @@ struct { struct __ecereNameSpace__ecere__sys__OldList * specifiers; struct __ecereNameSpace__ecere__sys__OldList * declarators; -} __attribute__ ((gcc_struct)) __anon1; +} ecere_gcc_struct __anon1; struct Instantiation * inst; struct { struct Identifier * id; struct Expression * exp; -} __attribute__ ((gcc_struct)) __anon2; -} __attribute__ ((gcc_struct)) __anon1; +} ecere_gcc_struct __anon2; +} ecere_gcc_struct __anon1; struct Specifier * extStorage; struct Symbol * symbol; int declMode; -} __attribute__ ((gcc_struct)); +} ecere_gcc_struct; struct External { @@ -1197,13 +1200,13 @@ struct Declaration * declaration; char * importString; struct Identifier * id; struct DBTableDef * table; -} __attribute__ ((gcc_struct)) __anon1; +} ecere_gcc_struct __anon1; int importType; struct External * fwdDecl; struct __ecereNameSpace__ecere__com__Instance * outgoing; struct __ecereNameSpace__ecere__com__Instance * incoming; int nonBreakableIncoming; -} __attribute__ ((gcc_struct)); +} ecere_gcc_struct; static void AddDefinitions(struct __ecereNameSpace__ecere__com__Class * regClass, struct __ecereNameSpace__ecere__com__DataMember * member, struct __ecereNameSpace__ecere__sys__OldList * definitions) { diff --git a/compiler/bootstrap/libec/bootstrap/freeAst.c b/compiler/bootstrap/libec/bootstrap/freeAst.c index 4790904..f2232bc 100644 --- a/compiler/bootstrap/libec/bootstrap/freeAst.c +++ b/compiler/bootstrap/libec/bootstrap/freeAst.c @@ -38,11 +38,14 @@ typedef unsigned __int64 uint64; #if defined(_WIN32) # if defined(__GNUC__) || defined(__TINYC__) # define ecere_stdcall __attribute__((__stdcall__)) +# define ecere_gcc_struct __attribute__((gcc_struct)) # else # define ecere_stdcall __stdcall +# define ecere_gcc_struct # endif #else # define ecere_stdcall +# define ecere_gcc_struct #endif #include #include @@ -63,7 +66,7 @@ void * last; int count; unsigned int offset; unsigned int circ; -} __attribute__ ((gcc_struct)); +} ecere_gcc_struct; struct __ecereNameSpace__ecere__com__DataValue { @@ -80,8 +83,8 @@ float f; double d; long long i64; uint64 ui64; -} __attribute__ ((gcc_struct)) __anon1; -} __attribute__ ((gcc_struct)); +} ecere_gcc_struct __anon1; +} ecere_gcc_struct; struct __ecereNameSpace__ecere__com__SerialBuffer { @@ -89,7 +92,7 @@ unsigned char * _buffer; unsigned int count; unsigned int _size; unsigned int pos; -} __attribute__ ((gcc_struct)); +} ecere_gcc_struct; extern void * __ecereNameSpace__ecere__com__eSystem_New(unsigned int size); @@ -111,7 +114,7 @@ int line; int charPos; int pos; int included; -} __attribute__ ((gcc_struct)); +} ecere_gcc_struct; struct TemplatedType; @@ -120,13 +123,13 @@ struct __ecereNameSpace__ecere__com__LinkList void * first; void * last; int count; -} __attribute__ ((gcc_struct)); +} ecere_gcc_struct; struct __ecereNameSpace__ecere__com__LinkElement { void * prev; void * next; -} __attribute__ ((gcc_struct)); +} ecere_gcc_struct; struct __ecereNameSpace__ecere__com__IteratorPointer; @@ -140,7 +143,7 @@ struct Location { struct CodePosition start; struct CodePosition end; -} __attribute__ ((gcc_struct)); +} ecere_gcc_struct; void FreeList(struct __ecereNameSpace__ecere__sys__OldList * list, void (* FreeFunction)(void *)) { @@ -162,7 +165,7 @@ struct Attrib struct Location loc; int type; struct __ecereNameSpace__ecere__sys__OldList * attribs; -} __attribute__ ((gcc_struct)); +} ecere_gcc_struct; struct ExtDecl { @@ -172,8 +175,8 @@ union { char * s; struct Attrib * attr; -} __attribute__ ((gcc_struct)) __anon1; -} __attribute__ ((gcc_struct)); +} ecere_gcc_struct __anon1; +} ecere_gcc_struct; struct Context; @@ -202,7 +205,7 @@ struct __ecereNameSpace__ecere__com__Instance void * * _vTbl; struct __ecereNameSpace__ecere__com__Class * _class; int _refCount; -} __attribute__ ((gcc_struct)); +} ecere_gcc_struct; extern long long __ecereNameSpace__ecere__com__eClass_GetProperty(struct __ecereNameSpace__ecere__com__Class * _class, const char * name); @@ -216,7 +219,7 @@ struct __ecereNameSpace__ecere__com__MapIterator { struct __ecereNameSpace__ecere__com__Instance * container; struct __ecereNameSpace__ecere__com__IteratorPointer * pointer; -} __attribute__ ((gcc_struct)); +} ecere_gcc_struct; extern struct __ecereNameSpace__ecere__com__Instance * loadedModules; @@ -224,7 +227,7 @@ struct __ecereNameSpace__ecere__com__Iterator { struct __ecereNameSpace__ecere__com__Instance * container; struct __ecereNameSpace__ecere__com__IteratorPointer * pointer; -} __attribute__ ((gcc_struct)); +} ecere_gcc_struct; extern void __ecereNameSpace__ecere__com__eInstance_DecRef(struct __ecereNameSpace__ecere__com__Instance * instance); @@ -253,7 +256,7 @@ struct __ecereNameSpace__ecere__sys__BTNode * parent; struct __ecereNameSpace__ecere__sys__BTNode * left; struct __ecereNameSpace__ecere__sys__BTNode * right; int depth; -} __attribute__ ((gcc_struct)); +} ecere_gcc_struct; struct __ecereNameSpace__ecere__sys__BTNode * __ecereProp___ecereNameSpace__ecere__sys__BTNode_Get_next(struct __ecereNameSpace__ecere__sys__BTNode * this); @@ -275,7 +278,7 @@ struct __ecereNameSpace__ecere__sys__NamedLink64 * prev; struct __ecereNameSpace__ecere__sys__NamedLink64 * next; char * name; long long data; -} __attribute__ ((gcc_struct)); +} ecere_gcc_struct; struct MethodImport; @@ -285,7 +288,7 @@ struct MethodImport * prev; struct MethodImport * next; char * name; unsigned int isVirtual; -} __attribute__ ((gcc_struct)); +} ecere_gcc_struct; void FreeMethodImport(struct MethodImport * imp) { @@ -305,7 +308,7 @@ struct Definition * prev; struct Definition * next; char * name; int type; -} __attribute__ ((gcc_struct)); +} ecere_gcc_struct; void FreeModuleDefine(struct Definition * def) { @@ -322,7 +325,7 @@ char * name; struct Symbol * symbol; struct __ecereNameSpace__ecere__sys__OldList * definitions; int declMode; -} __attribute__ ((gcc_struct)); +} ecere_gcc_struct; struct DBIndexItem; @@ -337,7 +340,7 @@ struct __ecereNameSpace__ecere__sys__OldList methods; struct __ecereNameSpace__ecere__sys__OldList properties; unsigned int itself; int isRemote; -} __attribute__ ((gcc_struct)); +} ecere_gcc_struct; void FreeClassImport(struct ClassImport * imp) { @@ -362,7 +365,7 @@ struct __ecereNameSpace__ecere__sys__OldList classes; struct __ecereNameSpace__ecere__sys__OldList functions; int importType; int importAccess; -} __attribute__ ((gcc_struct)); +} ecere_gcc_struct; void FreeModuleImport(struct ModuleImport * imp) { @@ -377,7 +380,7 @@ struct TemplateDatatype { struct __ecereNameSpace__ecere__sys__OldList * specifiers; struct Declarator * decl; -} __attribute__ ((gcc_struct)); +} ecere_gcc_struct; struct DBTableEntry; @@ -390,7 +393,7 @@ struct __ecereNameSpace__ecere__com__LinkElement out; struct External * from; struct External * to; unsigned int breakable; -} __attribute__ ((gcc_struct)); +} ecere_gcc_struct; struct Pointer; @@ -401,7 +404,7 @@ struct Pointer * next; struct Location loc; struct __ecereNameSpace__ecere__sys__OldList * qualifiers; struct Pointer * pointer; -} __attribute__ ((gcc_struct)); +} ecere_gcc_struct; struct PropertyWatch; @@ -420,7 +423,7 @@ struct Attribute * next; struct Location loc; char * attr; struct Expression * exp; -} __attribute__ ((gcc_struct)); +} ecere_gcc_struct; struct AsmField; @@ -434,7 +437,7 @@ struct Location loc; struct Statement * compound; struct __ecereNameSpace__ecere__sys__OldList * properties; unsigned int deleteWatch; -} __attribute__ ((gcc_struct)); +} ecere_gcc_struct; struct Initializer; @@ -449,7 +452,7 @@ struct Initializer * initializer; unsigned int used; unsigned int variable; unsigned int takeOutExp; -} __attribute__ ((gcc_struct)); +} ecere_gcc_struct; struct __ecereNameSpace__ecere__com__Method; @@ -473,7 +476,7 @@ struct __ecereNameSpace__ecere__sys__BTNode * root; int count; int (* CompareKey)(struct __ecereNameSpace__ecere__sys__BinaryTree * tree, uintptr_t a, uintptr_t b); void (* FreeKey)(void * key); -} __attribute__ ((gcc_struct)); +} ecere_gcc_struct; void __ecereMethod___ecereNameSpace__ecere__sys__BinaryTree_Remove(struct __ecereNameSpace__ecere__sys__BinaryTree * this, struct __ecereNameSpace__ecere__sys__BTNode * node); @@ -505,7 +508,7 @@ const char * category; unsigned int compiled; unsigned int selfWatchable; unsigned int isWatchable; -} __attribute__ ((gcc_struct)); +} ecere_gcc_struct; struct __ecereNameSpace__ecere__com__Method { @@ -522,7 +525,7 @@ void * symbol; const char * dataTypeString; struct Type * dataType; int memberAccess; -} __attribute__ ((gcc_struct)); +} ecere_gcc_struct; struct Symbol { @@ -537,7 +540,7 @@ union struct __ecereNameSpace__ecere__com__Method * method; struct __ecereNameSpace__ecere__com__Property * _property; struct __ecereNameSpace__ecere__com__Class * registered; -} __attribute__ ((gcc_struct)) __anon1; +} ecere_gcc_struct __anon1; unsigned int notYetDeclared; union { @@ -545,20 +548,20 @@ struct { struct External * pointerExternal; struct External * structExternal; -} __attribute__ ((gcc_struct)) __anon1; +} ecere_gcc_struct __anon1; struct { struct External * externalGet; struct External * externalSet; struct External * externalPtr; struct External * externalIsSet; -} __attribute__ ((gcc_struct)) __anon2; +} ecere_gcc_struct __anon2; struct { struct External * methodExternal; struct External * methodCodeExternal; -} __attribute__ ((gcc_struct)) __anon3; -} __attribute__ ((gcc_struct)) __anon2; +} ecere_gcc_struct __anon3; +} ecere_gcc_struct __anon2; unsigned int imported; unsigned int declaredStructSym; struct __ecereNameSpace__ecere__com__Class * _class; @@ -586,7 +589,7 @@ struct Context * ctx; int isIterator; struct Expression * propCategory; unsigned int mustRegister; -} __attribute__ ((gcc_struct)); +} ecere_gcc_struct; struct __ecereNameSpace__ecere__com__ClassProperty { @@ -600,7 +603,7 @@ long long (* Get)(struct __ecereNameSpace__ecere__com__Class *); const char * dataTypeString; struct Type * dataType; unsigned int constant; -} __attribute__ ((gcc_struct)); +} ecere_gcc_struct; void FreeSymbol(struct Symbol * symbol); @@ -626,7 +629,7 @@ struct Enumerator * next; struct Location loc; struct Identifier * id; struct Expression * exp; -} __attribute__ ((gcc_struct)); +} ecere_gcc_struct; struct Identifier { @@ -637,7 +640,7 @@ struct Symbol * classSym; struct Specifier * _class; char * string; struct Identifier * badID; -} __attribute__ ((gcc_struct)); +} ecere_gcc_struct; struct Declarator { @@ -655,26 +658,26 @@ struct struct Expression * exp; struct Expression * posExp; struct Attrib * attrib; -} __attribute__ ((gcc_struct)) structDecl; +} ecere_gcc_struct structDecl; struct { struct Expression * exp; struct Specifier * enumClass; -} __attribute__ ((gcc_struct)) array; +} ecere_gcc_struct array; struct { struct __ecereNameSpace__ecere__sys__OldList * parameters; -} __attribute__ ((gcc_struct)) function; +} ecere_gcc_struct function; struct { struct Pointer * pointer; -} __attribute__ ((gcc_struct)) pointer; +} ecere_gcc_struct pointer; struct { struct ExtDecl * extended; -} __attribute__ ((gcc_struct)) extended; -} __attribute__ ((gcc_struct)) __anon1; -} __attribute__ ((gcc_struct)); +} ecere_gcc_struct extended; +} ecere_gcc_struct __anon1; +} ecere_gcc_struct; struct AsmField { @@ -684,7 +687,7 @@ struct Location loc; char * command; struct Expression * expression; struct Identifier * symbolic; -} __attribute__ ((gcc_struct)); +} ecere_gcc_struct; struct Initializer { @@ -696,10 +699,10 @@ union { struct Expression * exp; struct __ecereNameSpace__ecere__sys__OldList * list; -} __attribute__ ((gcc_struct)) __anon1; +} ecere_gcc_struct __anon1; unsigned int isConstant; struct Identifier * id; -} __attribute__ ((gcc_struct)); +} ecere_gcc_struct; struct DBIndexItem { @@ -707,7 +710,7 @@ struct DBIndexItem * prev; struct DBIndexItem * next; struct Identifier * id; int order; -} __attribute__ ((gcc_struct)); +} ecere_gcc_struct; struct TypeName; @@ -720,7 +723,7 @@ struct __ecereNameSpace__ecere__sys__OldList * qualifiers; struct Declarator * declarator; int classObjectType; struct Expression * bitCount; -} __attribute__ ((gcc_struct)); +} ecere_gcc_struct; struct DBTableEntry { @@ -734,10 +737,10 @@ struct { struct TypeName * dataType; char * name; -} __attribute__ ((gcc_struct)) __anon1; +} ecere_gcc_struct __anon1; struct __ecereNameSpace__ecere__sys__OldList * items; -} __attribute__ ((gcc_struct)) __anon1; -} __attribute__ ((gcc_struct)); +} ecere_gcc_struct __anon1; +} ecere_gcc_struct; void FreeExternal(struct External * external); @@ -768,8 +771,8 @@ union { struct __ecereNameSpace__ecere__sys__OldList * dataMembers; struct ClassFunction * function; -} __attribute__ ((gcc_struct)) __anon1; -} __attribute__ ((gcc_struct)); +} ecere_gcc_struct __anon1; +} ecere_gcc_struct; struct ClassFunction { @@ -791,7 +794,7 @@ unsigned int isDestructor; unsigned int dontMangle; int id; int idCode; -} __attribute__ ((gcc_struct)); +} ecere_gcc_struct; struct InitDeclarator; @@ -802,7 +805,7 @@ struct InitDeclarator * next; struct Location loc; struct Declarator * declarator; struct Initializer * initializer; -} __attribute__ ((gcc_struct)); +} ecere_gcc_struct; struct __ecereNameSpace__ecere__com__DataMember; @@ -814,7 +817,7 @@ struct { const char * dataTypeString; struct __ecereNameSpace__ecere__com__Class * dataTypeClass; -} __attribute__ ((gcc_struct)) __anon1; +} ecere_gcc_struct __anon1; struct __ecereNameSpace__ecere__com__DataValue expression; struct { @@ -824,10 +827,10 @@ union struct __ecereNameSpace__ecere__com__DataMember * member; struct __ecereNameSpace__ecere__com__Property * prop; struct __ecereNameSpace__ecere__com__Method * method; -} __attribute__ ((gcc_struct)) __anon1; -} __attribute__ ((gcc_struct)) __anon2; -} __attribute__ ((gcc_struct)) __anon1; -} __attribute__ ((gcc_struct)); +} ecere_gcc_struct __anon1; +} ecere_gcc_struct __anon2; +} ecere_gcc_struct __anon1; +} ecere_gcc_struct; struct __ecereNameSpace__ecere__com__DataMember { @@ -849,7 +852,7 @@ struct __ecereNameSpace__ecere__sys__BinaryTree membersAlpha; int memberOffset; short structAlignment; short pointerAlignment; -} __attribute__ ((gcc_struct)); +} ecere_gcc_struct; struct __ecereNameSpace__ecere__com__NameSpace; @@ -865,7 +868,7 @@ struct __ecereNameSpace__ecere__sys__BinaryTree nameSpaces; struct __ecereNameSpace__ecere__sys__BinaryTree classes; struct __ecereNameSpace__ecere__sys__BinaryTree defines; struct __ecereNameSpace__ecere__sys__BinaryTree functions; -} __attribute__ ((gcc_struct)); +} ecere_gcc_struct; struct __ecereNameSpace__ecere__com__Class { @@ -924,7 +927,7 @@ struct __ecereNameSpace__ecere__sys__OldList templatized; int numParams; unsigned int isInstanceClass; unsigned int byValueSystemClass; -} __attribute__ ((gcc_struct)); +} ecere_gcc_struct; struct __ecereNameSpace__ecere__com__GlobalFunction { @@ -937,7 +940,7 @@ struct __ecereNameSpace__ecere__com__NameSpace * nameSpace; const char * dataTypeString; struct Type * dataType; void * symbol; -} __attribute__ ((gcc_struct)); +} ecere_gcc_struct; struct __ecereNameSpace__ecere__com__Application { @@ -948,7 +951,7 @@ unsigned int isGUIApp; struct __ecereNameSpace__ecere__sys__OldList allModules; char * parsedCommand; struct __ecereNameSpace__ecere__com__NameSpace systemNameSpace; -} __attribute__ ((gcc_struct)); +} ecere_gcc_struct; extern struct __ecereNameSpace__ecere__com__Class * __ecereClass___ecereNameSpace__ecere__sys__NamedLink64; @@ -1052,7 +1055,7 @@ int importType; int origImportType; struct __ecereNameSpace__ecere__com__NameSpace privateNameSpace; struct __ecereNameSpace__ecere__com__NameSpace publicNameSpace; -} __attribute__ ((gcc_struct)); +} ecere_gcc_struct; void FreeTemplateType(struct TemplatedType * type) { @@ -1103,7 +1106,7 @@ struct __ecereNameSpace__ecere__sys__BinaryTree templateTypes; struct ClassDefinition * classDef; unsigned int templateTypesOnly; unsigned int hasNameSpace; -} __attribute__ ((gcc_struct)); +} ecere_gcc_struct; struct ClassDefinition { @@ -1118,7 +1121,7 @@ struct Location blockStart; struct Location nameLoc; int declMode; unsigned int deleteWatchable; -} __attribute__ ((gcc_struct)); +} ecere_gcc_struct; void FreeContext(struct Context * context) { @@ -1170,7 +1173,7 @@ struct { struct __ecereNameSpace__ecere__sys__OldList members; char * enumName; -} __attribute__ ((gcc_struct)) __anon1; +} ecere_gcc_struct __anon1; struct { struct Type * returnType; @@ -1178,13 +1181,13 @@ struct __ecereNameSpace__ecere__sys__OldList params; struct Symbol * thisClass; unsigned int staticMethod; struct TemplateParameter * thisClassTemplate; -} __attribute__ ((gcc_struct)) __anon2; +} ecere_gcc_struct __anon2; struct { struct __ecereNameSpace__ecere__com__Method * method; struct __ecereNameSpace__ecere__com__Class * methodClass; struct __ecereNameSpace__ecere__com__Class * usedClass; -} __attribute__ ((gcc_struct)) __anon3; +} ecere_gcc_struct __anon3; struct { struct Type * arrayType; @@ -1192,10 +1195,10 @@ int arraySize; struct Expression * arraySizeExp; unsigned int freeExp; struct Symbol * enumClass; -} __attribute__ ((gcc_struct)) __anon4; +} ecere_gcc_struct __anon4; struct Type * type; struct TemplateParameter * templateParameter; -} __attribute__ ((gcc_struct)) __anon1; +} ecere_gcc_struct __anon1; int kind; unsigned int size; char * name; @@ -1222,7 +1225,7 @@ unsigned int typedByReference : 1; unsigned int casted : 1; unsigned int pointerAlignment : 1; unsigned int isLong : 1; -} __attribute__ ((gcc_struct)); +} ecere_gcc_struct; struct Specifier { @@ -1240,7 +1243,7 @@ char * name; struct Symbol * symbol; struct __ecereNameSpace__ecere__sys__OldList * templateArgs; struct Specifier * nsSpec; -} __attribute__ ((gcc_struct)) __anon1; +} ecere_gcc_struct __anon1; struct { struct Identifier * id; @@ -1250,12 +1253,12 @@ struct __ecereNameSpace__ecere__sys__OldList * definitions; unsigned int addNameSpace; struct Context * ctx; struct ExtDecl * extDeclStruct; -} __attribute__ ((gcc_struct)) __anon2; +} ecere_gcc_struct __anon2; struct Expression * expression; struct Specifier * _class; struct TemplateParameter * templateParameter; -} __attribute__ ((gcc_struct)) __anon1; -} __attribute__ ((gcc_struct)); +} ecere_gcc_struct __anon1; +} ecere_gcc_struct; void FreeType(struct Type * type) { @@ -1370,7 +1373,7 @@ struct Type * type; struct Symbol * propSet; int tempCount; unsigned int propertyNoThis; -} __attribute__ ((gcc_struct)); +} ecere_gcc_struct; struct Instantiation; @@ -1386,7 +1389,7 @@ struct { char * constant; struct Identifier * identifier; -} __attribute__ ((gcc_struct)) __anon1; +} ecere_gcc_struct __anon1; struct Statement * compound; struct Instantiation * instance; struct @@ -1394,86 +1397,86 @@ struct char * string; unsigned int intlString; unsigned int wideString; -} __attribute__ ((gcc_struct)) __anon2; +} ecere_gcc_struct __anon2; struct __ecereNameSpace__ecere__sys__OldList * list; struct { struct __ecereNameSpace__ecere__sys__OldList * specifiers; struct Declarator * decl; -} __attribute__ ((gcc_struct)) _classExp; +} ecere_gcc_struct _classExp; struct { struct Identifier * id; -} __attribute__ ((gcc_struct)) classData; +} ecere_gcc_struct classData; struct { struct Expression * exp; struct __ecereNameSpace__ecere__sys__OldList * arguments; struct Location argLoc; -} __attribute__ ((gcc_struct)) call; +} ecere_gcc_struct call; struct { struct Expression * exp; struct __ecereNameSpace__ecere__sys__OldList * index; -} __attribute__ ((gcc_struct)) index; +} ecere_gcc_struct index; struct { struct Expression * exp; struct Identifier * member; int memberType; unsigned int thisPtr; -} __attribute__ ((gcc_struct)) member; +} ecere_gcc_struct member; struct { int op; struct Expression * exp1; struct Expression * exp2; -} __attribute__ ((gcc_struct)) op; +} ecere_gcc_struct op; struct TypeName * typeName; struct Specifier * _class; struct { struct TypeName * typeName; struct Expression * exp; -} __attribute__ ((gcc_struct)) cast; +} ecere_gcc_struct cast; struct { struct Expression * cond; struct __ecereNameSpace__ecere__sys__OldList * exp; struct Expression * elseExp; -} __attribute__ ((gcc_struct)) cond; +} ecere_gcc_struct cond; struct { struct TypeName * typeName; struct Expression * size; -} __attribute__ ((gcc_struct)) _new; +} ecere_gcc_struct _new; struct { struct TypeName * typeName; struct Expression * size; struct Expression * exp; -} __attribute__ ((gcc_struct)) _renew; +} ecere_gcc_struct _renew; struct { char * table; struct Identifier * id; -} __attribute__ ((gcc_struct)) db; +} ecere_gcc_struct db; struct { struct Expression * ds; struct Expression * name; -} __attribute__ ((gcc_struct)) dbopen; +} ecere_gcc_struct dbopen; struct { struct TypeName * typeName; struct Initializer * initializer; -} __attribute__ ((gcc_struct)) initializer; +} ecere_gcc_struct initializer; struct { struct Expression * exp; struct TypeName * typeName; -} __attribute__ ((gcc_struct)) vaArg; -} __attribute__ ((gcc_struct)) __anon1; +} ecere_gcc_struct vaArg; +} ecere_gcc_struct __anon1; unsigned int debugValue; struct __ecereNameSpace__ecere__com__DataValue val; uint64 address; @@ -1489,7 +1492,7 @@ unsigned int needCast; unsigned int thisPtr; unsigned int opDestType; unsigned int needTemplateCast; -} __attribute__ ((gcc_struct)); +} ecere_gcc_struct; struct Instantiation { @@ -1506,7 +1509,7 @@ unsigned char * data; struct Location nameLoc; struct Location insideLoc; unsigned int built; -} __attribute__ ((gcc_struct)); +} ecere_gcc_struct; struct TemplateArgument; @@ -1522,8 +1525,8 @@ union struct Expression * expression; struct Identifier * identifier; struct TemplateDatatype * templateDatatype; -} __attribute__ ((gcc_struct)) __anon1; -} __attribute__ ((gcc_struct)); +} ecere_gcc_struct __anon1; +} ecere_gcc_struct; struct TemplateParameter { @@ -1536,11 +1539,11 @@ union { struct TemplateDatatype * dataType; int memberType; -} __attribute__ ((gcc_struct)) __anon1; +} ecere_gcc_struct __anon1; struct TemplateArgument * defaultArgument; const char * dataTypeString; struct Type * baseType; -} __attribute__ ((gcc_struct)); +} ecere_gcc_struct; struct Declaration; @@ -1557,51 +1560,51 @@ struct { struct Identifier * id; struct Statement * stmt; -} __attribute__ ((gcc_struct)) labeled; +} ecere_gcc_struct labeled; struct { struct Expression * exp; struct Statement * stmt; -} __attribute__ ((gcc_struct)) caseStmt; +} ecere_gcc_struct caseStmt; struct { struct __ecereNameSpace__ecere__sys__OldList * declarations; struct __ecereNameSpace__ecere__sys__OldList * statements; struct Context * context; unsigned int isSwitch; -} __attribute__ ((gcc_struct)) compound; +} ecere_gcc_struct compound; struct { struct __ecereNameSpace__ecere__sys__OldList * exp; struct Statement * stmt; struct Statement * elseStmt; -} __attribute__ ((gcc_struct)) ifStmt; +} ecere_gcc_struct ifStmt; struct { struct __ecereNameSpace__ecere__sys__OldList * exp; struct Statement * stmt; -} __attribute__ ((gcc_struct)) switchStmt; +} ecere_gcc_struct switchStmt; struct { struct __ecereNameSpace__ecere__sys__OldList * exp; struct Statement * stmt; -} __attribute__ ((gcc_struct)) whileStmt; +} ecere_gcc_struct whileStmt; struct { struct __ecereNameSpace__ecere__sys__OldList * exp; struct Statement * stmt; -} __attribute__ ((gcc_struct)) doWhile; +} ecere_gcc_struct doWhile; struct { struct Statement * init; struct Statement * check; struct __ecereNameSpace__ecere__sys__OldList * increment; struct Statement * stmt; -} __attribute__ ((gcc_struct)) forStmt; +} ecere_gcc_struct forStmt; struct { struct Identifier * id; -} __attribute__ ((gcc_struct)) gotoStmt; +} ecere_gcc_struct gotoStmt; struct { struct Specifier * spec; @@ -1609,23 +1612,23 @@ char * statements; struct __ecereNameSpace__ecere__sys__OldList * inputFields; struct __ecereNameSpace__ecere__sys__OldList * outputFields; struct __ecereNameSpace__ecere__sys__OldList * clobberedFields; -} __attribute__ ((gcc_struct)) asmStmt; +} ecere_gcc_struct asmStmt; struct { struct Expression * watcher; struct Expression * object; struct __ecereNameSpace__ecere__sys__OldList * watches; -} __attribute__ ((gcc_struct)) _watch; +} ecere_gcc_struct _watch; struct { struct Identifier * id; struct __ecereNameSpace__ecere__sys__OldList * exp; struct __ecereNameSpace__ecere__sys__OldList * filter; struct Statement * stmt; -} __attribute__ ((gcc_struct)) forEachStmt; +} ecere_gcc_struct forEachStmt; struct Declaration * decl; -} __attribute__ ((gcc_struct)) __anon1; -} __attribute__ ((gcc_struct)); +} ecere_gcc_struct __anon1; +} ecere_gcc_struct; struct Declaration { @@ -1639,18 +1642,18 @@ struct { struct __ecereNameSpace__ecere__sys__OldList * specifiers; struct __ecereNameSpace__ecere__sys__OldList * declarators; -} __attribute__ ((gcc_struct)) __anon1; +} ecere_gcc_struct __anon1; struct Instantiation * inst; struct { struct Identifier * id; struct Expression * exp; -} __attribute__ ((gcc_struct)) __anon2; -} __attribute__ ((gcc_struct)) __anon1; +} ecere_gcc_struct __anon2; +} ecere_gcc_struct __anon1; struct Specifier * extStorage; struct Symbol * symbol; int declMode; -} __attribute__ ((gcc_struct)); +} ecere_gcc_struct; struct External { @@ -1667,13 +1670,13 @@ struct Declaration * declaration; char * importString; struct Identifier * id; struct DBTableDef * table; -} __attribute__ ((gcc_struct)) __anon1; +} ecere_gcc_struct __anon1; int importType; struct External * fwdDecl; struct __ecereNameSpace__ecere__com__Instance * outgoing; struct __ecereNameSpace__ecere__com__Instance * incoming; int nonBreakableIncoming; -} __attribute__ ((gcc_struct)); +} ecere_gcc_struct; struct PropertyDef; @@ -1695,8 +1698,8 @@ struct unsigned int conversion : 1; unsigned int isWatchable : 1; unsigned int isDBProp : 1; -} __attribute__ ((gcc_struct)) __anon1; -} __attribute__ ((gcc_struct)); +} ecere_gcc_struct __anon1; +} ecere_gcc_struct; struct __ecereNameSpace__ecere__com__ClassTemplateParameter; @@ -1710,10 +1713,10 @@ union { const char * dataTypeString; int memberType; -} __attribute__ ((gcc_struct)) __anon1; +} ecere_gcc_struct __anon1; struct __ecereNameSpace__ecere__com__ClassTemplateArgument defaultArg; void * param; -} __attribute__ ((gcc_struct)); +} ecere_gcc_struct; void FreeDeclarator(struct Declarator * decl); @@ -2142,11 +2145,11 @@ struct { struct Identifier * id; struct Initializer * initializer; -} __attribute__ ((gcc_struct)) __anon1; -} __attribute__ ((gcc_struct)) __anon1; +} ecere_gcc_struct __anon1; +} ecere_gcc_struct __anon1; int memberAccess; void * object; -} __attribute__ ((gcc_struct)); +} ecere_gcc_struct; void FreeStatement(struct Statement * stmt); diff --git a/compiler/bootstrap/libec/bootstrap/grammar.c b/compiler/bootstrap/libec/bootstrap/grammar.c index 7ad9716..44246aa 100644 --- a/compiler/bootstrap/libec/bootstrap/grammar.c +++ b/compiler/bootstrap/libec/bootstrap/grammar.c @@ -38,11 +38,14 @@ typedef unsigned __int64 uint64; #if defined(_WIN32) # if defined(__GNUC__) || defined(__TINYC__) # define ecere_stdcall __attribute__((__stdcall__)) +# define ecere_gcc_struct __attribute__((gcc_struct)) # else # define ecere_stdcall __stdcall +# define ecere_gcc_struct # endif #else # define ecere_stdcall +# define ecere_gcc_struct #endif #include #include @@ -228,7 +231,7 @@ void * last; int count; unsigned int offset; unsigned int circ; -} __attribute__ ((gcc_struct)); +} ecere_gcc_struct; struct __ecereNameSpace__ecere__sys__BTNode; @@ -249,8 +252,8 @@ float f; double d; long long i64; uint64 ui64; -} __attribute__ ((gcc_struct)) __anon1; -} __attribute__ ((gcc_struct)); +} ecere_gcc_struct __anon1; +} ecere_gcc_struct; struct __ecereNameSpace__ecere__com__SerialBuffer { @@ -258,7 +261,7 @@ unsigned char * _buffer; unsigned int count; unsigned int _size; unsigned int pos; -} __attribute__ ((gcc_struct)); +} ecere_gcc_struct; extern void * __ecereNameSpace__ecere__com__eSystem_New(unsigned int size); @@ -296,7 +299,7 @@ int line; int charPos; int pos; int included; -} __attribute__ ((gcc_struct)); +} ecere_gcc_struct; extern char * __ecereNameSpace__ecere__sys__CopyString(const char * string); @@ -325,7 +328,7 @@ struct __ecereNameSpace__ecere__com__LinkList void * first; void * last; int count; -} __attribute__ ((gcc_struct)); +} ecere_gcc_struct; extern int strcmp(const char * , const char * ); @@ -381,7 +384,7 @@ struct Location { struct CodePosition start; struct CodePosition end; -} __attribute__ ((gcc_struct)); +} ecere_gcc_struct; extern void resetScannerPos(struct CodePosition * pos); @@ -394,7 +397,7 @@ struct Attrib struct Location loc; int type; struct __ecereNameSpace__ecere__sys__OldList * attribs; -} __attribute__ ((gcc_struct)); +} ecere_gcc_struct; extern void FreeAttrib(struct Attrib * attr); @@ -409,7 +412,7 @@ struct __ecereNameSpace__ecere__com__Instance void * * _vTbl; struct __ecereNameSpace__ecere__com__Class * _class; int _refCount; -} __attribute__ ((gcc_struct)); +} ecere_gcc_struct; extern long long __ecereNameSpace__ecere__com__eClass_GetProperty(struct __ecereNameSpace__ecere__com__Class * _class, const char * name); @@ -449,7 +452,7 @@ const char * category; unsigned int compiled; unsigned int selfWatchable; unsigned int isWatchable; -} __attribute__ ((gcc_struct)); +} ecere_gcc_struct; extern void __ecereNameSpace__ecere__com__eInstance_FireSelfWatchers(struct __ecereNameSpace__ecere__com__Instance * instance, struct __ecereNameSpace__ecere__com__Property * _property); @@ -501,8 +504,8 @@ union { struct __ecereNameSpace__ecere__sys__OldList * dataMembers; struct ClassFunction * function; -} __attribute__ ((gcc_struct)) __anon1; -} __attribute__ ((gcc_struct)); +} ecere_gcc_struct __anon1; +} ecere_gcc_struct; extern struct MembersInit * MkMembersInitMethod(struct ClassFunction * function); @@ -600,8 +603,8 @@ union struct Expression * expression; struct Identifier * identifier; struct TemplateDatatype * templateDatatype; -} __attribute__ ((gcc_struct)) __anon1; -} __attribute__ ((gcc_struct)); +} ecere_gcc_struct __anon1; +} ecere_gcc_struct; extern struct Expression * MkExpBrackets(struct __ecereNameSpace__ecere__sys__OldList * expressions); @@ -708,7 +711,7 @@ struct Attribute * next; struct Location loc; char * attr; struct Expression * exp; -} __attribute__ ((gcc_struct)); +} ecere_gcc_struct; struct Initializer; @@ -727,7 +730,7 @@ struct Initializer * initializer; unsigned int used; unsigned int variable; unsigned int takeOutExp; -} __attribute__ ((gcc_struct)); +} ecere_gcc_struct; struct Initializer { @@ -739,10 +742,10 @@ union { struct Expression * exp; struct __ecereNameSpace__ecere__sys__OldList * list; -} __attribute__ ((gcc_struct)) __anon1; +} ecere_gcc_struct __anon1; unsigned int isConstant; struct Identifier * id; -} __attribute__ ((gcc_struct)); +} ecere_gcc_struct; extern struct MemberInit * MkMemberInit(struct __ecereNameSpace__ecere__sys__OldList * ids, struct Initializer * initializer); @@ -767,7 +770,7 @@ struct InitDeclarator * next; struct Location loc; struct Declarator * declarator; struct Initializer * initializer; -} __attribute__ ((gcc_struct)); +} ecere_gcc_struct; struct Statement; @@ -787,7 +790,7 @@ struct { char * constant; struct Identifier * identifier; -} __attribute__ ((gcc_struct)) __anon1; +} ecere_gcc_struct __anon1; struct Statement * compound; struct Instantiation * instance; struct @@ -795,86 +798,86 @@ struct char * string; unsigned int intlString; unsigned int wideString; -} __attribute__ ((gcc_struct)) __anon2; +} ecere_gcc_struct __anon2; struct __ecereNameSpace__ecere__sys__OldList * list; struct { struct __ecereNameSpace__ecere__sys__OldList * specifiers; struct Declarator * decl; -} __attribute__ ((gcc_struct)) _classExp; +} ecere_gcc_struct _classExp; struct { struct Identifier * id; -} __attribute__ ((gcc_struct)) classData; +} ecere_gcc_struct classData; struct { struct Expression * exp; struct __ecereNameSpace__ecere__sys__OldList * arguments; struct Location argLoc; -} __attribute__ ((gcc_struct)) call; +} ecere_gcc_struct call; struct { struct Expression * exp; struct __ecereNameSpace__ecere__sys__OldList * index; -} __attribute__ ((gcc_struct)) index; +} ecere_gcc_struct index; struct { struct Expression * exp; struct Identifier * member; int memberType; unsigned int thisPtr; -} __attribute__ ((gcc_struct)) member; +} ecere_gcc_struct member; struct { int op; struct Expression * exp1; struct Expression * exp2; -} __attribute__ ((gcc_struct)) op; +} ecere_gcc_struct op; struct TypeName * typeName; struct Specifier * _class; struct { struct TypeName * typeName; struct Expression * exp; -} __attribute__ ((gcc_struct)) cast; +} ecere_gcc_struct cast; struct { struct Expression * cond; struct __ecereNameSpace__ecere__sys__OldList * exp; struct Expression * elseExp; -} __attribute__ ((gcc_struct)) cond; +} ecere_gcc_struct cond; struct { struct TypeName * typeName; struct Expression * size; -} __attribute__ ((gcc_struct)) _new; +} ecere_gcc_struct _new; struct { struct TypeName * typeName; struct Expression * size; struct Expression * exp; -} __attribute__ ((gcc_struct)) _renew; +} ecere_gcc_struct _renew; struct { char * table; struct Identifier * id; -} __attribute__ ((gcc_struct)) db; +} ecere_gcc_struct db; struct { struct Expression * ds; struct Expression * name; -} __attribute__ ((gcc_struct)) dbopen; +} ecere_gcc_struct dbopen; struct { struct TypeName * typeName; struct Initializer * initializer; -} __attribute__ ((gcc_struct)) initializer; +} ecere_gcc_struct initializer; struct { struct Expression * exp; struct TypeName * typeName; -} __attribute__ ((gcc_struct)) vaArg; -} __attribute__ ((gcc_struct)) __anon1; +} ecere_gcc_struct vaArg; +} ecere_gcc_struct __anon1; unsigned int debugValue; struct __ecereNameSpace__ecere__com__DataValue val; uint64 address; @@ -890,7 +893,7 @@ unsigned int needCast; unsigned int thisPtr; unsigned int opDestType; unsigned int needTemplateCast; -} __attribute__ ((gcc_struct)); +} ecere_gcc_struct; extern struct PropertyDef * MkProperty(struct __ecereNameSpace__ecere__sys__OldList * specs, struct Declarator * decl, struct Identifier * id, struct Statement * setStmt, struct Statement * getStmt); @@ -953,51 +956,51 @@ struct { struct Identifier * id; struct Statement * stmt; -} __attribute__ ((gcc_struct)) labeled; +} ecere_gcc_struct labeled; struct { struct Expression * exp; struct Statement * stmt; -} __attribute__ ((gcc_struct)) caseStmt; +} ecere_gcc_struct caseStmt; struct { struct __ecereNameSpace__ecere__sys__OldList * declarations; struct __ecereNameSpace__ecere__sys__OldList * statements; struct Context * context; unsigned int isSwitch; -} __attribute__ ((gcc_struct)) compound; +} ecere_gcc_struct compound; struct { struct __ecereNameSpace__ecere__sys__OldList * exp; struct Statement * stmt; struct Statement * elseStmt; -} __attribute__ ((gcc_struct)) ifStmt; +} ecere_gcc_struct ifStmt; struct { struct __ecereNameSpace__ecere__sys__OldList * exp; struct Statement * stmt; -} __attribute__ ((gcc_struct)) switchStmt; +} ecere_gcc_struct switchStmt; struct { struct __ecereNameSpace__ecere__sys__OldList * exp; struct Statement * stmt; -} __attribute__ ((gcc_struct)) whileStmt; +} ecere_gcc_struct whileStmt; struct { struct __ecereNameSpace__ecere__sys__OldList * exp; struct Statement * stmt; -} __attribute__ ((gcc_struct)) doWhile; +} ecere_gcc_struct doWhile; struct { struct Statement * init; struct Statement * check; struct __ecereNameSpace__ecere__sys__OldList * increment; struct Statement * stmt; -} __attribute__ ((gcc_struct)) forStmt; +} ecere_gcc_struct forStmt; struct { struct Identifier * id; -} __attribute__ ((gcc_struct)) gotoStmt; +} ecere_gcc_struct gotoStmt; struct { struct Specifier * spec; @@ -1005,23 +1008,23 @@ char * statements; struct __ecereNameSpace__ecere__sys__OldList * inputFields; struct __ecereNameSpace__ecere__sys__OldList * outputFields; struct __ecereNameSpace__ecere__sys__OldList * clobberedFields; -} __attribute__ ((gcc_struct)) asmStmt; +} ecere_gcc_struct asmStmt; struct { struct Expression * watcher; struct Expression * object; struct __ecereNameSpace__ecere__sys__OldList * watches; -} __attribute__ ((gcc_struct)) _watch; +} ecere_gcc_struct _watch; struct { struct Identifier * id; struct __ecereNameSpace__ecere__sys__OldList * exp; struct __ecereNameSpace__ecere__sys__OldList * filter; struct Statement * stmt; -} __attribute__ ((gcc_struct)) forEachStmt; +} ecere_gcc_struct forEachStmt; struct Declaration * decl; -} __attribute__ ((gcc_struct)) __anon1; -} __attribute__ ((gcc_struct)); +} ecere_gcc_struct __anon1; +} ecere_gcc_struct; struct ClassDef { @@ -1042,11 +1045,11 @@ struct { struct Identifier * id; struct Initializer * initializer; -} __attribute__ ((gcc_struct)) __anon1; -} __attribute__ ((gcc_struct)) __anon1; +} ecere_gcc_struct __anon1; +} ecere_gcc_struct __anon1; int memberAccess; void * object; -} __attribute__ ((gcc_struct)); +} ecere_gcc_struct; extern struct ClassDef * MkClassDefDeclaration(struct Declaration * decl); @@ -1099,7 +1102,7 @@ struct Symbol * classSym; struct Specifier * _class; char * string; struct Identifier * badID; -} __attribute__ ((gcc_struct)); +} ecere_gcc_struct; struct Specifier { @@ -1117,7 +1120,7 @@ char * name; struct Symbol * symbol; struct __ecereNameSpace__ecere__sys__OldList * templateArgs; struct Specifier * nsSpec; -} __attribute__ ((gcc_struct)) __anon1; +} ecere_gcc_struct __anon1; struct { struct Identifier * id; @@ -1127,12 +1130,12 @@ struct __ecereNameSpace__ecere__sys__OldList * definitions; unsigned int addNameSpace; struct Context * ctx; struct ExtDecl * extDeclStruct; -} __attribute__ ((gcc_struct)) __anon2; +} ecere_gcc_struct __anon2; struct Expression * expression; struct Specifier * _class; struct TemplateParameter * templateParameter; -} __attribute__ ((gcc_struct)) __anon1; -} __attribute__ ((gcc_struct)); +} ecere_gcc_struct __anon1; +} ecere_gcc_struct; struct ClassFunction { @@ -1154,7 +1157,7 @@ unsigned int isDestructor; unsigned int dontMangle; int id; int idCode; -} __attribute__ ((gcc_struct)); +} ecere_gcc_struct; struct Declarator { @@ -1172,26 +1175,26 @@ struct struct Expression * exp; struct Expression * posExp; struct Attrib * attrib; -} __attribute__ ((gcc_struct)) structDecl; +} ecere_gcc_struct structDecl; struct { struct Expression * exp; struct Specifier * enumClass; -} __attribute__ ((gcc_struct)) array; +} ecere_gcc_struct array; struct { struct __ecereNameSpace__ecere__sys__OldList * parameters; -} __attribute__ ((gcc_struct)) function; +} ecere_gcc_struct function; struct { struct Pointer * pointer; -} __attribute__ ((gcc_struct)) pointer; +} ecere_gcc_struct pointer; struct { struct ExtDecl * extended; -} __attribute__ ((gcc_struct)) extended; -} __attribute__ ((gcc_struct)) __anon1; -} __attribute__ ((gcc_struct)); +} ecere_gcc_struct extended; +} ecere_gcc_struct __anon1; +} ecere_gcc_struct; struct Instantiation { @@ -1208,7 +1211,7 @@ unsigned char * data; struct Location nameLoc; struct Location insideLoc; unsigned int built; -} __attribute__ ((gcc_struct)); +} ecere_gcc_struct; struct PropertyDef { @@ -1228,8 +1231,8 @@ struct unsigned int conversion : 1; unsigned int isWatchable : 1; unsigned int isDBProp : 1; -} __attribute__ ((gcc_struct)) __anon1; -} __attribute__ ((gcc_struct)); +} ecere_gcc_struct __anon1; +} ecere_gcc_struct; struct Declaration { @@ -1243,18 +1246,18 @@ struct { struct __ecereNameSpace__ecere__sys__OldList * specifiers; struct __ecereNameSpace__ecere__sys__OldList * declarators; -} __attribute__ ((gcc_struct)) __anon1; +} ecere_gcc_struct __anon1; struct Instantiation * inst; struct { struct Identifier * id; struct Expression * exp; -} __attribute__ ((gcc_struct)) __anon2; -} __attribute__ ((gcc_struct)) __anon1; +} ecere_gcc_struct __anon2; +} ecere_gcc_struct __anon1; struct Specifier * extStorage; struct Symbol * symbol; int declMode; -} __attribute__ ((gcc_struct)); +} ecere_gcc_struct; extern struct Symbol * DeclClassAddNameSpace(struct Specifier * _class, const char * className); @@ -1273,7 +1276,7 @@ struct Location blockStart; struct Location nameLoc; int declMode; unsigned int deleteWatchable; -} __attribute__ ((gcc_struct)); +} ecere_gcc_struct; extern struct ClassDefinition * MkClass(struct Symbol * symbol, struct __ecereNameSpace__ecere__sys__OldList * baseSpecs, struct __ecereNameSpace__ecere__sys__OldList * definitions); @@ -1295,7 +1298,7 @@ struct Type * type; struct Symbol * propSet; int tempCount; unsigned int propertyNoThis; -} __attribute__ ((gcc_struct)); +} ecere_gcc_struct; struct DBTableDef { @@ -1303,7 +1306,7 @@ char * name; struct Symbol * symbol; struct __ecereNameSpace__ecere__sys__OldList * definitions; int declMode; -} __attribute__ ((gcc_struct)); +} ecere_gcc_struct; struct External { @@ -1320,13 +1323,13 @@ struct Declaration * declaration; char * importString; struct Identifier * id; struct DBTableDef * table; -} __attribute__ ((gcc_struct)) __anon1; +} ecere_gcc_struct __anon1; int importType; struct External * fwdDecl; struct __ecereNameSpace__ecere__com__Instance * outgoing; struct __ecereNameSpace__ecere__com__Instance * incoming; int nonBreakableIncoming; -} __attribute__ ((gcc_struct)); +} ecere_gcc_struct; extern struct External * MkExternalDBTable(struct DBTableDef * table); @@ -1340,7 +1343,7 @@ struct __ecereNameSpace__ecere__sys__BTNode * root; int count; int (* CompareKey)(struct __ecereNameSpace__ecere__sys__BinaryTree * tree, uintptr_t a, uintptr_t b); void (* FreeKey)(void * key); -} __attribute__ ((gcc_struct)); +} ecere_gcc_struct; struct __ecereNameSpace__ecere__com__Method; @@ -1359,7 +1362,7 @@ void * symbol; const char * dataTypeString; struct Type * dataType; int memberAccess; -} __attribute__ ((gcc_struct)); +} ecere_gcc_struct; struct Symbol { @@ -1374,7 +1377,7 @@ union struct __ecereNameSpace__ecere__com__Method * method; struct __ecereNameSpace__ecere__com__Property * _property; struct __ecereNameSpace__ecere__com__Class * registered; -} __attribute__ ((gcc_struct)) __anon1; +} ecere_gcc_struct __anon1; unsigned int notYetDeclared; union { @@ -1382,20 +1385,20 @@ struct { struct External * pointerExternal; struct External * structExternal; -} __attribute__ ((gcc_struct)) __anon1; +} ecere_gcc_struct __anon1; struct { struct External * externalGet; struct External * externalSet; struct External * externalPtr; struct External * externalIsSet; -} __attribute__ ((gcc_struct)) __anon2; +} ecere_gcc_struct __anon2; struct { struct External * methodExternal; struct External * methodCodeExternal; -} __attribute__ ((gcc_struct)) __anon3; -} __attribute__ ((gcc_struct)) __anon2; +} ecere_gcc_struct __anon3; +} ecere_gcc_struct __anon2; unsigned int imported; unsigned int declaredStructSym; struct __ecereNameSpace__ecere__com__Class * _class; @@ -1423,7 +1426,7 @@ struct Context * ctx; int isIterator; struct Expression * propCategory; unsigned int mustRegister; -} __attribute__ ((gcc_struct)); +} ecere_gcc_struct; struct AsmField; @@ -1467,7 +1470,7 @@ struct TemplateDatatype * templateDatatype; struct DBTableEntry * dbtableEntry; struct DBIndexItem * dbindexItem; struct DBTableDef * dbtableDef; -} __attribute__ ((gcc_struct)) YYSTYPE; +} ecere_gcc_struct YYSTYPE; extern YYSTYPE yylval; @@ -1476,7 +1479,7 @@ union yyalloc yytype_int16 yyss_alloc; YYSTYPE yyvs_alloc; struct Location yyls_alloc; -} __attribute__ ((gcc_struct)); +} ecere_gcc_struct; static void yy_symbol_value_print(FILE * yyoutput, int yytype, YYSTYPE const * const yyvaluep, struct Location const * const yylocationp) { @@ -1503,7 +1506,7 @@ struct Location loc; char * command; struct Expression * expression; struct Identifier * symbolic; -} __attribute__ ((gcc_struct)); +} ecere_gcc_struct; static void yy_symbol_print(FILE * yyoutput, int yytype, YYSTYPE const * const yyvaluep, struct Location const * const yylocationp) { @@ -1546,7 +1549,7 @@ struct __ecereNameSpace__ecere__sys__BinaryTree nameSpaces; struct __ecereNameSpace__ecere__sys__BinaryTree classes; struct __ecereNameSpace__ecere__sys__BinaryTree defines; struct __ecereNameSpace__ecere__sys__BinaryTree functions; -} __attribute__ ((gcc_struct)); +} ecere_gcc_struct; struct __ecereNameSpace__ecere__com__Application { @@ -1557,7 +1560,7 @@ unsigned int isGUIApp; struct __ecereNameSpace__ecere__sys__OldList allModules; char * parsedCommand; struct __ecereNameSpace__ecere__com__NameSpace systemNameSpace; -} __attribute__ ((gcc_struct)); +} ecere_gcc_struct; struct __ecereNameSpace__ecere__com__DataMember; @@ -1569,7 +1572,7 @@ struct { const char * dataTypeString; struct __ecereNameSpace__ecere__com__Class * dataTypeClass; -} __attribute__ ((gcc_struct)) __anon1; +} ecere_gcc_struct __anon1; struct __ecereNameSpace__ecere__com__DataValue expression; struct { @@ -1579,10 +1582,10 @@ union struct __ecereNameSpace__ecere__com__DataMember * member; struct __ecereNameSpace__ecere__com__Property * prop; struct __ecereNameSpace__ecere__com__Method * method; -} __attribute__ ((gcc_struct)) __anon1; -} __attribute__ ((gcc_struct)) __anon2; -} __attribute__ ((gcc_struct)) __anon1; -} __attribute__ ((gcc_struct)); +} ecere_gcc_struct __anon1; +} ecere_gcc_struct __anon2; +} ecere_gcc_struct __anon1; +} ecere_gcc_struct; struct __ecereNameSpace__ecere__com__DataMember { @@ -1604,7 +1607,7 @@ struct __ecereNameSpace__ecere__sys__BinaryTree membersAlpha; int memberOffset; short structAlignment; short pointerAlignment; -} __attribute__ ((gcc_struct)); +} ecere_gcc_struct; struct __ecereNameSpace__ecere__com__Module; @@ -1624,7 +1627,7 @@ int importType; int origImportType; struct __ecereNameSpace__ecere__com__NameSpace privateNameSpace; struct __ecereNameSpace__ecere__com__NameSpace publicNameSpace; -} __attribute__ ((gcc_struct)); +} ecere_gcc_struct; struct __ecereNameSpace__ecere__com__Class { @@ -1683,7 +1686,7 @@ struct __ecereNameSpace__ecere__sys__OldList templatized; int numParams; unsigned int isInstanceClass; unsigned int byValueSystemClass; -} __attribute__ ((gcc_struct)); +} ecere_gcc_struct; void __ecereRegisterModule_grammar(struct __ecereNameSpace__ecere__com__Instance * module) { diff --git a/compiler/bootstrap/libec/bootstrap/lexer.c b/compiler/bootstrap/libec/bootstrap/lexer.c index 3f8ba2d..f67c3d8 100644 --- a/compiler/bootstrap/libec/bootstrap/lexer.c +++ b/compiler/bootstrap/libec/bootstrap/lexer.c @@ -38,11 +38,14 @@ typedef unsigned __int64 uint64; #if defined(_WIN32) # if defined(__GNUC__) || defined(__TINYC__) # define ecere_stdcall __attribute__((__stdcall__)) +# define ecere_gcc_struct __attribute__((gcc_struct)) # else # define ecere_stdcall __stdcall +# define ecere_gcc_struct # endif #else # define ecere_stdcall +# define ecere_gcc_struct #endif #include #include @@ -124,7 +127,7 @@ int yy_is_interactive; int yy_at_bol; int yy_fill_buffer; int yy_buffer_status; -} __attribute__ ((gcc_struct)); +} ecere_gcc_struct; static char yy_hold_char; @@ -252,7 +255,7 @@ void * last; int count; unsigned int offset; unsigned int circ; -} __attribute__ ((gcc_struct)); +} ecere_gcc_struct; struct Type; @@ -271,8 +274,8 @@ float f; double d; long long i64; uint64 ui64; -} __attribute__ ((gcc_struct)) __anon1; -} __attribute__ ((gcc_struct)); +} ecere_gcc_struct __anon1; +} ecere_gcc_struct; struct __ecereNameSpace__ecere__com__SerialBuffer { @@ -280,7 +283,7 @@ unsigned char * _buffer; unsigned int count; unsigned int _size; unsigned int pos; -} __attribute__ ((gcc_struct)); +} ecere_gcc_struct; extern void * __ecereNameSpace__ecere__com__eSystem_New(unsigned int size); @@ -364,7 +367,7 @@ int line; int charPos; int pos; int included; -} __attribute__ ((gcc_struct)); +} ecere_gcc_struct; extern char * strcpy(char * , const char * ); @@ -536,7 +539,7 @@ struct TemplateDatatype * templateDatatype; struct DBTableEntry * dbtableEntry; struct DBIndexItem * dbindexItem; struct DBTableDef * dbtableDef; -} __attribute__ ((gcc_struct)) YYSTYPE; +} ecere_gcc_struct YYSTYPE; extern YYSTYPE yylval; @@ -544,7 +547,7 @@ struct Location { struct CodePosition start; struct CodePosition end; -} __attribute__ ((gcc_struct)); +} ecere_gcc_struct; void SetSomeSourceFileStack(const char * fileName, int index) { @@ -836,7 +839,7 @@ struct __ecereNameSpace__ecere__com__Instance void * * _vTbl; struct __ecereNameSpace__ecere__com__Class * _class; int _refCount; -} __attribute__ ((gcc_struct)); +} ecere_gcc_struct; extern long long __ecereNameSpace__ecere__com__eClass_GetProperty(struct __ecereNameSpace__ecere__com__Class * _class, const char * name); @@ -877,7 +880,7 @@ char yy_hold_char; int yychar; int yy_init; int yy_start; -} __attribute__ ((gcc_struct)); +} ecere_gcc_struct; extern void __ecereNameSpace__ecere__com__eInstance_DecRef(struct __ecereNameSpace__ecere__com__Instance * instance); @@ -2301,7 +2304,7 @@ const char * category; unsigned int compiled; unsigned int selfWatchable; unsigned int isWatchable; -} __attribute__ ((gcc_struct)); +} ecere_gcc_struct; extern void __ecereNameSpace__ecere__com__eInstance_FireSelfWatchers(struct __ecereNameSpace__ecere__com__Instance * instance, struct __ecereNameSpace__ecere__com__Property * _property); @@ -2319,7 +2322,7 @@ struct __ecereNameSpace__ecere__sys__BTNode * root; int count; int (* CompareKey)(struct __ecereNameSpace__ecere__sys__BinaryTree * tree, uintptr_t a, uintptr_t b); void (* FreeKey)(void * key); -} __attribute__ ((gcc_struct)); +} ecere_gcc_struct; struct __ecereNameSpace__ecere__com__Method; @@ -2338,7 +2341,7 @@ void * symbol; const char * dataTypeString; struct Type * dataType; int memberAccess; -} __attribute__ ((gcc_struct)); +} ecere_gcc_struct; struct __ecereNameSpace__ecere__com__DataMember; @@ -2350,7 +2353,7 @@ struct { const char * dataTypeString; struct __ecereNameSpace__ecere__com__Class * dataTypeClass; -} __attribute__ ((gcc_struct)) __anon1; +} ecere_gcc_struct __anon1; struct __ecereNameSpace__ecere__com__DataValue expression; struct { @@ -2360,10 +2363,10 @@ union struct __ecereNameSpace__ecere__com__DataMember * member; struct __ecereNameSpace__ecere__com__Property * prop; struct __ecereNameSpace__ecere__com__Method * method; -} __attribute__ ((gcc_struct)) __anon1; -} __attribute__ ((gcc_struct)) __anon2; -} __attribute__ ((gcc_struct)) __anon1; -} __attribute__ ((gcc_struct)); +} ecere_gcc_struct __anon1; +} ecere_gcc_struct __anon2; +} ecere_gcc_struct __anon1; +} ecere_gcc_struct; struct __ecereNameSpace__ecere__com__DataMember { @@ -2385,7 +2388,7 @@ struct __ecereNameSpace__ecere__sys__BinaryTree membersAlpha; int memberOffset; short structAlignment; short pointerAlignment; -} __attribute__ ((gcc_struct)); +} ecere_gcc_struct; extern struct __ecereNameSpace__ecere__com__DataMember * __ecereNameSpace__ecere__com__eClass_AddDataMember(struct __ecereNameSpace__ecere__com__Class * _class, const char * name, const char * type, unsigned int size, unsigned int alignment, int declMode); @@ -2411,7 +2414,7 @@ struct __ecereNameSpace__ecere__sys__BinaryTree nameSpaces; struct __ecereNameSpace__ecere__sys__BinaryTree classes; struct __ecereNameSpace__ecere__sys__BinaryTree defines; struct __ecereNameSpace__ecere__sys__BinaryTree functions; -} __attribute__ ((gcc_struct)); +} ecere_gcc_struct; struct __ecereNameSpace__ecere__com__Class { @@ -2470,7 +2473,7 @@ struct __ecereNameSpace__ecere__sys__OldList templatized; int numParams; unsigned int isInstanceClass; unsigned int byValueSystemClass; -} __attribute__ ((gcc_struct)); +} ecere_gcc_struct; struct __ecereNameSpace__ecere__com__Application { @@ -2481,7 +2484,7 @@ unsigned int isGUIApp; struct __ecereNameSpace__ecere__sys__OldList allModules; char * parsedCommand; struct __ecereNameSpace__ecere__com__NameSpace systemNameSpace; -} __attribute__ ((gcc_struct)); +} ecere_gcc_struct; static struct __ecereNameSpace__ecere__com__Class * __ecereClass_yy_buffer_state; @@ -2507,7 +2510,7 @@ int importType; int origImportType; struct __ecereNameSpace__ecere__com__NameSpace privateNameSpace; struct __ecereNameSpace__ecere__com__NameSpace publicNameSpace; -} __attribute__ ((gcc_struct)); +} ecere_gcc_struct; struct __ecereNameSpace__ecere__com__Instance * pushLexer() { diff --git a/compiler/bootstrap/libec/bootstrap/loadSymbols.c b/compiler/bootstrap/libec/bootstrap/loadSymbols.c index 60e24f4..c20dfa3 100644 --- a/compiler/bootstrap/libec/bootstrap/loadSymbols.c +++ b/compiler/bootstrap/libec/bootstrap/loadSymbols.c @@ -38,11 +38,14 @@ typedef unsigned __int64 uint64; #if defined(_WIN32) # if defined(__GNUC__) || defined(__TINYC__) # define ecere_stdcall __attribute__((__stdcall__)) +# define ecere_gcc_struct __attribute__((gcc_struct)) # else # define ecere_stdcall __stdcall +# define ecere_gcc_struct # endif #else # define ecere_stdcall +# define ecere_gcc_struct #endif #include #include @@ -92,7 +95,7 @@ void * last; int count; unsigned int offset; unsigned int circ; -} __attribute__ ((gcc_struct)); +} ecere_gcc_struct; struct Type; @@ -111,8 +114,8 @@ float f; double d; long long i64; uint64 ui64; -} __attribute__ ((gcc_struct)) __anon1; -} __attribute__ ((gcc_struct)); +} ecere_gcc_struct __anon1; +} ecere_gcc_struct; struct __ecereNameSpace__ecere__com__SerialBuffer { @@ -120,7 +123,7 @@ unsigned char * _buffer; unsigned int count; unsigned int _size; unsigned int pos; -} __attribute__ ((gcc_struct)); +} ecere_gcc_struct; extern void * __ecereNameSpace__ecere__com__eSystem_New(unsigned int size); @@ -162,7 +165,7 @@ int line; int charPos; int pos; int included; -} __attribute__ ((gcc_struct)); +} ecere_gcc_struct; struct Context; @@ -190,7 +193,7 @@ int yy_is_interactive; int yy_at_bol; int yy_fill_buffer; int yy_buffer_status; -} __attribute__ ((gcc_struct)); +} ecere_gcc_struct; struct Identifier; @@ -324,7 +327,7 @@ struct Location { struct CodePosition start; struct CodePosition end; -} __attribute__ ((gcc_struct)); +} ecere_gcc_struct; void SetSysIncludeDirs(struct __ecereNameSpace__ecere__sys__OldList * list) { @@ -367,7 +370,7 @@ struct { char * constant; struct Identifier * identifier; -} __attribute__ ((gcc_struct)) __anon1; +} ecere_gcc_struct __anon1; struct Statement * compound; struct Instantiation * instance; struct @@ -375,86 +378,86 @@ struct char * string; unsigned int intlString; unsigned int wideString; -} __attribute__ ((gcc_struct)) __anon2; +} ecere_gcc_struct __anon2; struct __ecereNameSpace__ecere__sys__OldList * list; struct { struct __ecereNameSpace__ecere__sys__OldList * specifiers; struct Declarator * decl; -} __attribute__ ((gcc_struct)) _classExp; +} ecere_gcc_struct _classExp; struct { struct Identifier * id; -} __attribute__ ((gcc_struct)) classData; +} ecere_gcc_struct classData; struct { struct Expression * exp; struct __ecereNameSpace__ecere__sys__OldList * arguments; struct Location argLoc; -} __attribute__ ((gcc_struct)) call; +} ecere_gcc_struct call; struct { struct Expression * exp; struct __ecereNameSpace__ecere__sys__OldList * index; -} __attribute__ ((gcc_struct)) index; +} ecere_gcc_struct index; struct { struct Expression * exp; struct Identifier * member; int memberType; unsigned int thisPtr; -} __attribute__ ((gcc_struct)) member; +} ecere_gcc_struct member; struct { int op; struct Expression * exp1; struct Expression * exp2; -} __attribute__ ((gcc_struct)) op; +} ecere_gcc_struct op; struct TypeName * typeName; struct Specifier * _class; struct { struct TypeName * typeName; struct Expression * exp; -} __attribute__ ((gcc_struct)) cast; +} ecere_gcc_struct cast; struct { struct Expression * cond; struct __ecereNameSpace__ecere__sys__OldList * exp; struct Expression * elseExp; -} __attribute__ ((gcc_struct)) cond; +} ecere_gcc_struct cond; struct { struct TypeName * typeName; struct Expression * size; -} __attribute__ ((gcc_struct)) _new; +} ecere_gcc_struct _new; struct { struct TypeName * typeName; struct Expression * size; struct Expression * exp; -} __attribute__ ((gcc_struct)) _renew; +} ecere_gcc_struct _renew; struct { char * table; struct Identifier * id; -} __attribute__ ((gcc_struct)) db; +} ecere_gcc_struct db; struct { struct Expression * ds; struct Expression * name; -} __attribute__ ((gcc_struct)) dbopen; +} ecere_gcc_struct dbopen; struct { struct TypeName * typeName; struct Initializer * initializer; -} __attribute__ ((gcc_struct)) initializer; +} ecere_gcc_struct initializer; struct { struct Expression * exp; struct TypeName * typeName; -} __attribute__ ((gcc_struct)) vaArg; -} __attribute__ ((gcc_struct)) __anon1; +} ecere_gcc_struct vaArg; +} ecere_gcc_struct __anon1; unsigned int debugValue; struct __ecereNameSpace__ecere__com__DataValue val; uint64 address; @@ -470,7 +473,7 @@ unsigned int needCast; unsigned int thisPtr; unsigned int opDestType; unsigned int needTemplateCast; -} __attribute__ ((gcc_struct)); +} ecere_gcc_struct; extern void ProcessExpressionType(struct Expression * exp); @@ -485,7 +488,7 @@ struct __ecereNameSpace__ecere__com__Instance void * * _vTbl; struct __ecereNameSpace__ecere__com__Class * _class; int _refCount; -} __attribute__ ((gcc_struct)); +} ecere_gcc_struct; extern long long __ecereNameSpace__ecere__com__eClass_GetProperty(struct __ecereNameSpace__ecere__com__Class * _class, const char * name); @@ -534,19 +537,19 @@ char yy_hold_char; int yychar; int yy_init; int yy_start; -} __attribute__ ((gcc_struct)); +} ecere_gcc_struct; struct __ecereNameSpace__ecere__com__MapIterator { struct __ecereNameSpace__ecere__com__Instance * container; struct __ecereNameSpace__ecere__com__IteratorPointer * pointer; -} __attribute__ ((gcc_struct)); +} ecere_gcc_struct; struct __ecereNameSpace__ecere__com__Iterator { struct __ecereNameSpace__ecere__com__Instance * container; struct __ecereNameSpace__ecere__com__IteratorPointer * pointer; -} __attribute__ ((gcc_struct)); +} ecere_gcc_struct; extern struct __ecereNameSpace__ecere__com__Instance * __ecereNameSpace__ecere__sys__FileOpen(const char * fileName, int mode); @@ -593,7 +596,7 @@ struct __ecereNameSpace__ecere__sys__BTNode * parent; struct __ecereNameSpace__ecere__sys__BTNode * left; struct __ecereNameSpace__ecere__sys__BTNode * right; int depth; -} __attribute__ ((gcc_struct)); +} ecere_gcc_struct; struct __ecereNameSpace__ecere__com__Property; @@ -621,7 +624,7 @@ const char * category; unsigned int compiled; unsigned int selfWatchable; unsigned int isWatchable; -} __attribute__ ((gcc_struct)); +} ecere_gcc_struct; extern void __ecereNameSpace__ecere__com__eInstance_FireSelfWatchers(struct __ecereNameSpace__ecere__com__Instance * instance, struct __ecereNameSpace__ecere__com__Property * _property); @@ -662,7 +665,7 @@ struct __ecereNameSpace__ecere__sys__OldLink struct __ecereNameSpace__ecere__sys__OldLink * prev; struct __ecereNameSpace__ecere__sys__OldLink * next; void * data; -} __attribute__ ((gcc_struct)); +} ecere_gcc_struct; struct DataRedefinition; @@ -673,7 +676,7 @@ struct DataRedefinition * next; char name[1024]; char type1[1024]; char type2[1024]; -} __attribute__ ((gcc_struct)); +} ecere_gcc_struct; void CheckDataRedefinitions() { @@ -708,7 +711,7 @@ int importType; unsigned int globalInstance; unsigned int dllOnly; int importAccess; -} __attribute__ ((gcc_struct)); +} ecere_gcc_struct; struct __ecereNameSpace__ecere__sys__NamedItem; @@ -717,7 +720,7 @@ struct __ecereNameSpace__ecere__sys__NamedItem struct __ecereNameSpace__ecere__sys__NamedItem * prev; struct __ecereNameSpace__ecere__sys__NamedItem * next; char * name; -} __attribute__ ((gcc_struct)); +} ecere_gcc_struct; struct __ecereNameSpace__ecere__com__Instance * OpenIncludeFile(char * includeFile) { @@ -800,7 +803,7 @@ unsigned int (* Sma)(struct Expression *, struct Operand *, struct Operand *); unsigned int (* GrtEqu)(struct Expression *, struct Operand *, struct Operand *); unsigned int (* SmaEqu)(struct Expression *, struct Operand *, struct Operand *); unsigned int (* Cond)(struct Expression *, struct Operand *, struct Operand *, struct Operand *); -} __attribute__ ((gcc_struct)); +} ecere_gcc_struct; struct Operand { @@ -819,9 +822,9 @@ float f; double d; long long i64; uint64 ui64; -} __attribute__ ((gcc_struct)) __anon1; +} ecere_gcc_struct __anon1; struct OpTable ops; -} __attribute__ ((gcc_struct)); +} ecere_gcc_struct; extern struct Operand GetOperand(struct Expression * exp); @@ -835,7 +838,7 @@ struct { const char * dataTypeString; struct __ecereNameSpace__ecere__com__Class * dataTypeClass; -} __attribute__ ((gcc_struct)) __anon1; +} ecere_gcc_struct __anon1; struct __ecereNameSpace__ecere__com__DataValue expression; struct { @@ -845,10 +848,10 @@ union struct __ecereNameSpace__ecere__com__DataMember * member; struct __ecereNameSpace__ecere__com__Property * prop; struct __ecereNameSpace__ecere__com__Method * method; -} __attribute__ ((gcc_struct)) __anon1; -} __attribute__ ((gcc_struct)) __anon2; -} __attribute__ ((gcc_struct)) __anon1; -} __attribute__ ((gcc_struct)); +} ecere_gcc_struct __anon1; +} ecere_gcc_struct __anon2; +} ecere_gcc_struct __anon1; +} ecere_gcc_struct; struct __ecereNameSpace__ecere__com__Method { @@ -865,7 +868,7 @@ void * symbol; const char * dataTypeString; struct Type * dataType; int memberAccess; -} __attribute__ ((gcc_struct)); +} ecere_gcc_struct; struct Symbol { @@ -880,7 +883,7 @@ union struct __ecereNameSpace__ecere__com__Method * method; struct __ecereNameSpace__ecere__com__Property * _property; struct __ecereNameSpace__ecere__com__Class * registered; -} __attribute__ ((gcc_struct)) __anon1; +} ecere_gcc_struct __anon1; unsigned int notYetDeclared; union { @@ -888,20 +891,20 @@ struct { struct External * pointerExternal; struct External * structExternal; -} __attribute__ ((gcc_struct)) __anon1; +} ecere_gcc_struct __anon1; struct { struct External * externalGet; struct External * externalSet; struct External * externalPtr; struct External * externalIsSet; -} __attribute__ ((gcc_struct)) __anon2; +} ecere_gcc_struct __anon2; struct { struct External * methodExternal; struct External * methodCodeExternal; -} __attribute__ ((gcc_struct)) __anon3; -} __attribute__ ((gcc_struct)) __anon2; +} ecere_gcc_struct __anon3; +} ecere_gcc_struct __anon2; unsigned int imported; unsigned int declaredStructSym; struct __ecereNameSpace__ecere__com__Class * _class; @@ -929,7 +932,7 @@ struct Context * ctx; int isIterator; struct Expression * propCategory; unsigned int mustRegister; -} __attribute__ ((gcc_struct)); +} ecere_gcc_struct; extern struct __ecereNameSpace__ecere__com__Method * __ecereNameSpace__ecere__com__eClass_AddVirtualMethod(struct __ecereNameSpace__ecere__com__Class * _class, const char * name, const char * type, void * function, int declMode); @@ -957,7 +960,7 @@ int type; int size; int pos; uint64 mask; -} __attribute__ ((gcc_struct)); +} ecere_gcc_struct; struct __ecereNameSpace__ecere__com__Module; @@ -985,7 +988,7 @@ char * dataTypeString; struct Type * dataType; void * symbol; char * fullName; -} __attribute__ ((gcc_struct)); +} ecere_gcc_struct; extern struct __ecereNameSpace__ecere__com__Instance * __ecereNameSpace__ecere__com__eModule_LoadStrict(struct __ecereNameSpace__ecere__com__Instance * fromModule, const char * name, int importAccess); @@ -999,7 +1002,7 @@ struct __ecereNameSpace__ecere__sys__BTNode * root; int count; int (* CompareKey)(struct __ecereNameSpace__ecere__sys__BinaryTree * tree, uintptr_t a, uintptr_t b); void (* FreeKey)(void * key); -} __attribute__ ((gcc_struct)); +} ecere_gcc_struct; struct __ecereNameSpace__ecere__com__NameSpace { @@ -1013,7 +1016,7 @@ struct __ecereNameSpace__ecere__sys__BinaryTree nameSpaces; struct __ecereNameSpace__ecere__sys__BinaryTree classes; struct __ecereNameSpace__ecere__sys__BinaryTree defines; struct __ecereNameSpace__ecere__sys__BinaryTree functions; -} __attribute__ ((gcc_struct)); +} ecere_gcc_struct; struct __ecereNameSpace__ecere__com__Class { @@ -1072,7 +1075,7 @@ struct __ecereNameSpace__ecere__sys__OldList templatized; int numParams; unsigned int isInstanceClass; unsigned int byValueSystemClass; -} __attribute__ ((gcc_struct)); +} ecere_gcc_struct; struct __ecereNameSpace__ecere__com__DataMember { @@ -1094,7 +1097,7 @@ struct __ecereNameSpace__ecere__sys__BinaryTree membersAlpha; int memberOffset; short structAlignment; short pointerAlignment; -} __attribute__ ((gcc_struct)); +} ecere_gcc_struct; struct __ecereNameSpace__ecere__sys__BTNode * __ecereMethod___ecereNameSpace__ecere__sys__BinaryTree_FindString(struct __ecereNameSpace__ecere__sys__BinaryTree * this, const char * key); @@ -1113,7 +1116,7 @@ unsigned int isGUIApp; struct __ecereNameSpace__ecere__sys__OldList allModules; char * parsedCommand; struct __ecereNameSpace__ecere__com__NameSpace systemNameSpace; -} __attribute__ ((gcc_struct)); +} ecere_gcc_struct; void SetGlobalData(struct __ecereNameSpace__ecere__com__NameSpace * nameSpace) { @@ -1235,7 +1238,7 @@ int importType; int origImportType; struct __ecereNameSpace__ecere__com__NameSpace privateNameSpace; struct __ecereNameSpace__ecere__com__NameSpace publicNameSpace; -} __attribute__ ((gcc_struct)); +} ecere_gcc_struct; void __ecereCreateModuleInstances_loadSymbols() { diff --git a/compiler/bootstrap/libec/bootstrap/output.c b/compiler/bootstrap/libec/bootstrap/output.c index 0cde53d..d652568 100644 --- a/compiler/bootstrap/libec/bootstrap/output.c +++ b/compiler/bootstrap/libec/bootstrap/output.c @@ -38,11 +38,14 @@ typedef unsigned __int64 uint64; #if defined(_WIN32) # if defined(__GNUC__) || defined(__TINYC__) # define ecere_stdcall __attribute__((__stdcall__)) +# define ecere_gcc_struct __attribute__((gcc_struct)) # else # define ecere_stdcall __stdcall +# define ecere_gcc_struct # endif #else # define ecere_stdcall +# define ecere_gcc_struct #endif #include #include @@ -70,7 +73,7 @@ void * last; int count; unsigned int offset; unsigned int circ; -} __attribute__ ((gcc_struct)); +} ecere_gcc_struct; struct __ecereNameSpace__ecere__sys__BTNode; @@ -89,8 +92,8 @@ float f; double d; long long i64; uint64 ui64; -} __attribute__ ((gcc_struct)) __anon1; -} __attribute__ ((gcc_struct)); +} ecere_gcc_struct __anon1; +} ecere_gcc_struct; struct __ecereNameSpace__ecere__com__SerialBuffer { @@ -98,7 +101,7 @@ unsigned char * _buffer; unsigned int count; unsigned int _size; unsigned int pos; -} __attribute__ ((gcc_struct)); +} ecere_gcc_struct; extern void * __ecereNameSpace__ecere__com__eSystem_New(unsigned int size); @@ -130,7 +133,7 @@ int line; int charPos; int pos; int included; -} __attribute__ ((gcc_struct)); +} ecere_gcc_struct; extern int strcmp(const char * , const char * ); @@ -155,7 +158,7 @@ struct __ecereNameSpace__ecere__com__LinkList void * first; void * last; int count; -} __attribute__ ((gcc_struct)); +} ecere_gcc_struct; extern char * __ecereNameSpace__ecere__sys__TrimRSpaces(const char * string, char * output); @@ -181,7 +184,7 @@ struct Location { struct CodePosition start; struct CodePosition end; -} __attribute__ ((gcc_struct)); +} ecere_gcc_struct; static void GetSourceName(char * name, const char * src) { @@ -204,7 +207,7 @@ struct Attrib struct Location loc; int type; struct __ecereNameSpace__ecere__sys__OldList * attribs; -} __attribute__ ((gcc_struct)); +} ecere_gcc_struct; struct ExtDecl { @@ -214,8 +217,8 @@ union { char * s; struct Attrib * attr; -} __attribute__ ((gcc_struct)) __anon1; -} __attribute__ ((gcc_struct)); +} ecere_gcc_struct __anon1; +} ecere_gcc_struct; struct Expression; @@ -234,7 +237,7 @@ struct __ecereNameSpace__ecere__com__Instance void * * _vTbl; struct __ecereNameSpace__ecere__com__Class * _class; int _refCount; -} __attribute__ ((gcc_struct)); +} ecere_gcc_struct; extern long long __ecereNameSpace__ecere__com__eClass_GetProperty(struct __ecereNameSpace__ecere__com__Class * _class, const char * name); @@ -290,7 +293,7 @@ struct TemplateDatatype { struct __ecereNameSpace__ecere__sys__OldList * specifiers; struct Declarator * decl; -} __attribute__ ((gcc_struct)); +} ecere_gcc_struct; extern struct Declarator * PlugDeclarator(struct Declarator * decl, struct Declarator * baseDecl); @@ -322,7 +325,7 @@ const char * category; unsigned int compiled; unsigned int selfWatchable; unsigned int isWatchable; -} __attribute__ ((gcc_struct)); +} ecere_gcc_struct; extern void PrintType(struct Type * type, char * string, unsigned int printName, unsigned int fullName); @@ -337,7 +340,7 @@ struct __ecereNameSpace__ecere__sys__OldList * qualifiers; struct Declarator * declarator; int classObjectType; struct Expression * bitCount; -} __attribute__ ((gcc_struct)); +} ecere_gcc_struct; extern struct TypeName * MkTypeName(struct __ecereNameSpace__ecere__sys__OldList * qualifiers, struct Declarator * declarator); @@ -356,7 +359,7 @@ struct Symbol * classSym; struct Specifier * _class; char * string; struct Identifier * badID; -} __attribute__ ((gcc_struct)); +} ecere_gcc_struct; extern struct Symbol * FindClass(const char * name); @@ -368,7 +371,7 @@ struct __ecereNameSpace__ecere__sys__BTNode * root; int count; int (* CompareKey)(struct __ecereNameSpace__ecere__sys__BinaryTree * tree, uintptr_t a, uintptr_t b); void (* FreeKey)(void * key); -} __attribute__ ((gcc_struct)); +} ecere_gcc_struct; struct Pointer; @@ -379,7 +382,7 @@ struct Pointer * next; struct Location loc; struct __ecereNameSpace__ecere__sys__OldList * qualifiers; struct Pointer * pointer; -} __attribute__ ((gcc_struct)); +} ecere_gcc_struct; struct Declarator { @@ -397,26 +400,26 @@ struct struct Expression * exp; struct Expression * posExp; struct Attrib * attrib; -} __attribute__ ((gcc_struct)) structDecl; +} ecere_gcc_struct structDecl; struct { struct Expression * exp; struct Specifier * enumClass; -} __attribute__ ((gcc_struct)) array; +} ecere_gcc_struct array; struct { struct __ecereNameSpace__ecere__sys__OldList * parameters; -} __attribute__ ((gcc_struct)) function; +} ecere_gcc_struct function; struct { struct Pointer * pointer; -} __attribute__ ((gcc_struct)) pointer; +} ecere_gcc_struct pointer; struct { struct ExtDecl * extended; -} __attribute__ ((gcc_struct)) extended; -} __attribute__ ((gcc_struct)) __anon1; -} __attribute__ ((gcc_struct)); +} ecere_gcc_struct extended; +} ecere_gcc_struct __anon1; +} ecere_gcc_struct; struct MemberInit; @@ -431,7 +434,7 @@ struct Attribute * next; struct Location loc; char * attr; struct Expression * exp; -} __attribute__ ((gcc_struct)); +} ecere_gcc_struct; struct __ecereNameSpace__ecere__com__Module; @@ -459,7 +462,7 @@ struct __ecereNameSpace__ecere__sys__BinaryTree membersAlpha; int memberOffset; short structAlignment; short pointerAlignment; -} __attribute__ ((gcc_struct)); +} ecere_gcc_struct; struct AsmField; @@ -471,7 +474,7 @@ struct Location loc; char * command; struct Expression * expression; struct Identifier * symbolic; -} __attribute__ ((gcc_struct)); +} ecere_gcc_struct; struct Enumerator; @@ -482,7 +485,7 @@ struct Enumerator * next; struct Location loc; struct Identifier * id; struct Expression * exp; -} __attribute__ ((gcc_struct)); +} ecere_gcc_struct; struct ClassDef; @@ -498,10 +501,10 @@ union { struct Expression * exp; struct __ecereNameSpace__ecere__sys__OldList * list; -} __attribute__ ((gcc_struct)) __anon1; +} ecere_gcc_struct __anon1; unsigned int isConstant; struct Identifier * id; -} __attribute__ ((gcc_struct)); +} ecere_gcc_struct; struct MemberInit { @@ -514,7 +517,7 @@ struct Initializer * initializer; unsigned int used; unsigned int variable; unsigned int takeOutExp; -} __attribute__ ((gcc_struct)); +} ecere_gcc_struct; struct Statement; @@ -534,7 +537,7 @@ struct Type * type; struct Symbol * propSet; int tempCount; unsigned int propertyNoThis; -} __attribute__ ((gcc_struct)); +} ecere_gcc_struct; struct __ecereNameSpace__ecere__com__Method; @@ -546,7 +549,7 @@ struct { const char * dataTypeString; struct __ecereNameSpace__ecere__com__Class * dataTypeClass; -} __attribute__ ((gcc_struct)) __anon1; +} ecere_gcc_struct __anon1; struct __ecereNameSpace__ecere__com__DataValue expression; struct { @@ -556,10 +559,10 @@ union struct __ecereNameSpace__ecere__com__DataMember * member; struct __ecereNameSpace__ecere__com__Property * prop; struct __ecereNameSpace__ecere__com__Method * method; -} __attribute__ ((gcc_struct)) __anon1; -} __attribute__ ((gcc_struct)) __anon2; -} __attribute__ ((gcc_struct)) __anon1; -} __attribute__ ((gcc_struct)); +} ecere_gcc_struct __anon1; +} ecere_gcc_struct __anon2; +} ecere_gcc_struct __anon1; +} ecere_gcc_struct; struct __ecereNameSpace__ecere__com__Method { @@ -576,7 +579,7 @@ void * symbol; const char * dataTypeString; struct Type * dataType; int memberAccess; -} __attribute__ ((gcc_struct)); +} ecere_gcc_struct; struct TemplateParameter; @@ -596,7 +599,7 @@ char * name; struct Symbol * symbol; struct __ecereNameSpace__ecere__sys__OldList * templateArgs; struct Specifier * nsSpec; -} __attribute__ ((gcc_struct)) __anon1; +} ecere_gcc_struct __anon1; struct { struct Identifier * id; @@ -606,12 +609,12 @@ struct __ecereNameSpace__ecere__sys__OldList * definitions; unsigned int addNameSpace; struct Context * ctx; struct ExtDecl * extDeclStruct; -} __attribute__ ((gcc_struct)) __anon2; +} ecere_gcc_struct __anon2; struct Expression * expression; struct Specifier * _class; struct TemplateParameter * templateParameter; -} __attribute__ ((gcc_struct)) __anon1; -} __attribute__ ((gcc_struct)); +} ecere_gcc_struct __anon1; +} ecere_gcc_struct; struct TemplateParameter { @@ -624,11 +627,11 @@ union { struct TemplateDatatype * dataType; int memberType; -} __attribute__ ((gcc_struct)) __anon1; +} ecere_gcc_struct __anon1; struct TemplateArgument * defaultArgument; const char * dataTypeString; struct Type * baseType; -} __attribute__ ((gcc_struct)); +} ecere_gcc_struct; struct Type { @@ -642,7 +645,7 @@ struct { struct __ecereNameSpace__ecere__sys__OldList members; char * enumName; -} __attribute__ ((gcc_struct)) __anon1; +} ecere_gcc_struct __anon1; struct { struct Type * returnType; @@ -650,13 +653,13 @@ struct __ecereNameSpace__ecere__sys__OldList params; struct Symbol * thisClass; unsigned int staticMethod; struct TemplateParameter * thisClassTemplate; -} __attribute__ ((gcc_struct)) __anon2; +} ecere_gcc_struct __anon2; struct { struct __ecereNameSpace__ecere__com__Method * method; struct __ecereNameSpace__ecere__com__Class * methodClass; struct __ecereNameSpace__ecere__com__Class * usedClass; -} __attribute__ ((gcc_struct)) __anon3; +} ecere_gcc_struct __anon3; struct { struct Type * arrayType; @@ -664,10 +667,10 @@ int arraySize; struct Expression * arraySizeExp; unsigned int freeExp; struct Symbol * enumClass; -} __attribute__ ((gcc_struct)) __anon4; +} ecere_gcc_struct __anon4; struct Type * type; struct TemplateParameter * templateParameter; -} __attribute__ ((gcc_struct)) __anon1; +} ecere_gcc_struct __anon1; int kind; unsigned int size; char * name; @@ -694,7 +697,7 @@ unsigned int typedByReference : 1; unsigned int casted : 1; unsigned int pointerAlignment : 1; unsigned int isLong : 1; -} __attribute__ ((gcc_struct)); +} ecere_gcc_struct; struct Declaration; @@ -711,51 +714,51 @@ struct { struct Identifier * id; struct Statement * stmt; -} __attribute__ ((gcc_struct)) labeled; +} ecere_gcc_struct labeled; struct { struct Expression * exp; struct Statement * stmt; -} __attribute__ ((gcc_struct)) caseStmt; +} ecere_gcc_struct caseStmt; struct { struct __ecereNameSpace__ecere__sys__OldList * declarations; struct __ecereNameSpace__ecere__sys__OldList * statements; struct Context * context; unsigned int isSwitch; -} __attribute__ ((gcc_struct)) compound; +} ecere_gcc_struct compound; struct { struct __ecereNameSpace__ecere__sys__OldList * exp; struct Statement * stmt; struct Statement * elseStmt; -} __attribute__ ((gcc_struct)) ifStmt; +} ecere_gcc_struct ifStmt; struct { struct __ecereNameSpace__ecere__sys__OldList * exp; struct Statement * stmt; -} __attribute__ ((gcc_struct)) switchStmt; +} ecere_gcc_struct switchStmt; struct { struct __ecereNameSpace__ecere__sys__OldList * exp; struct Statement * stmt; -} __attribute__ ((gcc_struct)) whileStmt; +} ecere_gcc_struct whileStmt; struct { struct __ecereNameSpace__ecere__sys__OldList * exp; struct Statement * stmt; -} __attribute__ ((gcc_struct)) doWhile; +} ecere_gcc_struct doWhile; struct { struct Statement * init; struct Statement * check; struct __ecereNameSpace__ecere__sys__OldList * increment; struct Statement * stmt; -} __attribute__ ((gcc_struct)) forStmt; +} ecere_gcc_struct forStmt; struct { struct Identifier * id; -} __attribute__ ((gcc_struct)) gotoStmt; +} ecere_gcc_struct gotoStmt; struct { struct Specifier * spec; @@ -763,23 +766,23 @@ char * statements; struct __ecereNameSpace__ecere__sys__OldList * inputFields; struct __ecereNameSpace__ecere__sys__OldList * outputFields; struct __ecereNameSpace__ecere__sys__OldList * clobberedFields; -} __attribute__ ((gcc_struct)) asmStmt; +} ecere_gcc_struct asmStmt; struct { struct Expression * watcher; struct Expression * object; struct __ecereNameSpace__ecere__sys__OldList * watches; -} __attribute__ ((gcc_struct)) _watch; +} ecere_gcc_struct _watch; struct { struct Identifier * id; struct __ecereNameSpace__ecere__sys__OldList * exp; struct __ecereNameSpace__ecere__sys__OldList * filter; struct Statement * stmt; -} __attribute__ ((gcc_struct)) forEachStmt; +} ecere_gcc_struct forEachStmt; struct Declaration * decl; -} __attribute__ ((gcc_struct)) __anon1; -} __attribute__ ((gcc_struct)); +} ecere_gcc_struct __anon1; +} ecere_gcc_struct; struct Instantiation; @@ -795,7 +798,7 @@ struct { char * constant; struct Identifier * identifier; -} __attribute__ ((gcc_struct)) __anon1; +} ecere_gcc_struct __anon1; struct Statement * compound; struct Instantiation * instance; struct @@ -803,86 +806,86 @@ struct char * string; unsigned int intlString; unsigned int wideString; -} __attribute__ ((gcc_struct)) __anon2; +} ecere_gcc_struct __anon2; struct __ecereNameSpace__ecere__sys__OldList * list; struct { struct __ecereNameSpace__ecere__sys__OldList * specifiers; struct Declarator * decl; -} __attribute__ ((gcc_struct)) _classExp; +} ecere_gcc_struct _classExp; struct { struct Identifier * id; -} __attribute__ ((gcc_struct)) classData; +} ecere_gcc_struct classData; struct { struct Expression * exp; struct __ecereNameSpace__ecere__sys__OldList * arguments; struct Location argLoc; -} __attribute__ ((gcc_struct)) call; +} ecere_gcc_struct call; struct { struct Expression * exp; struct __ecereNameSpace__ecere__sys__OldList * index; -} __attribute__ ((gcc_struct)) index; +} ecere_gcc_struct index; struct { struct Expression * exp; struct Identifier * member; int memberType; unsigned int thisPtr; -} __attribute__ ((gcc_struct)) member; +} ecere_gcc_struct member; struct { int op; struct Expression * exp1; struct Expression * exp2; -} __attribute__ ((gcc_struct)) op; +} ecere_gcc_struct op; struct TypeName * typeName; struct Specifier * _class; struct { struct TypeName * typeName; struct Expression * exp; -} __attribute__ ((gcc_struct)) cast; +} ecere_gcc_struct cast; struct { struct Expression * cond; struct __ecereNameSpace__ecere__sys__OldList * exp; struct Expression * elseExp; -} __attribute__ ((gcc_struct)) cond; +} ecere_gcc_struct cond; struct { struct TypeName * typeName; struct Expression * size; -} __attribute__ ((gcc_struct)) _new; +} ecere_gcc_struct _new; struct { struct TypeName * typeName; struct Expression * size; struct Expression * exp; -} __attribute__ ((gcc_struct)) _renew; +} ecere_gcc_struct _renew; struct { char * table; struct Identifier * id; -} __attribute__ ((gcc_struct)) db; +} ecere_gcc_struct db; struct { struct Expression * ds; struct Expression * name; -} __attribute__ ((gcc_struct)) dbopen; +} ecere_gcc_struct dbopen; struct { struct TypeName * typeName; struct Initializer * initializer; -} __attribute__ ((gcc_struct)) initializer; +} ecere_gcc_struct initializer; struct { struct Expression * exp; struct TypeName * typeName; -} __attribute__ ((gcc_struct)) vaArg; -} __attribute__ ((gcc_struct)) __anon1; +} ecere_gcc_struct vaArg; +} ecere_gcc_struct __anon1; unsigned int debugValue; struct __ecereNameSpace__ecere__com__DataValue val; uint64 address; @@ -898,7 +901,7 @@ unsigned int needCast; unsigned int thisPtr; unsigned int opDestType; unsigned int needTemplateCast; -} __attribute__ ((gcc_struct)); +} ecere_gcc_struct; struct Declaration { @@ -912,18 +915,18 @@ struct { struct __ecereNameSpace__ecere__sys__OldList * specifiers; struct __ecereNameSpace__ecere__sys__OldList * declarators; -} __attribute__ ((gcc_struct)) __anon1; +} ecere_gcc_struct __anon1; struct Instantiation * inst; struct { struct Identifier * id; struct Expression * exp; -} __attribute__ ((gcc_struct)) __anon2; -} __attribute__ ((gcc_struct)) __anon1; +} ecere_gcc_struct __anon2; +} ecere_gcc_struct __anon1; struct Specifier * extStorage; struct Symbol * symbol; int declMode; -} __attribute__ ((gcc_struct)); +} ecere_gcc_struct; struct Instantiation { @@ -940,7 +943,7 @@ unsigned char * data; struct Location nameLoc; struct Location insideLoc; unsigned int built; -} __attribute__ ((gcc_struct)); +} ecere_gcc_struct; struct ClassDefinition; @@ -957,7 +960,7 @@ struct Location blockStart; struct Location nameLoc; int declMode; unsigned int deleteWatchable; -} __attribute__ ((gcc_struct)); +} ecere_gcc_struct; struct __ecereNameSpace__ecere__com__NameSpace; @@ -973,7 +976,7 @@ struct __ecereNameSpace__ecere__sys__BinaryTree nameSpaces; struct __ecereNameSpace__ecere__sys__BinaryTree classes; struct __ecereNameSpace__ecere__sys__BinaryTree defines; struct __ecereNameSpace__ecere__sys__BinaryTree functions; -} __attribute__ ((gcc_struct)); +} ecere_gcc_struct; struct __ecereNameSpace__ecere__com__Class { @@ -1032,7 +1035,7 @@ struct __ecereNameSpace__ecere__sys__OldList templatized; int numParams; unsigned int isInstanceClass; unsigned int byValueSystemClass; -} __attribute__ ((gcc_struct)); +} ecere_gcc_struct; struct __ecereNameSpace__ecere__com__Application { @@ -1043,7 +1046,7 @@ unsigned int isGUIApp; struct __ecereNameSpace__ecere__sys__OldList allModules; char * parsedCommand; struct __ecereNameSpace__ecere__com__NameSpace systemNameSpace; -} __attribute__ ((gcc_struct)); +} ecere_gcc_struct; extern struct __ecereNameSpace__ecere__com__Class * __ecereClass_TypeName; @@ -1067,7 +1070,7 @@ int importType; int origImportType; struct __ecereNameSpace__ecere__com__NameSpace privateNameSpace; struct __ecereNameSpace__ecere__com__NameSpace publicNameSpace; -} __attribute__ ((gcc_struct)); +} ecere_gcc_struct; static void OutputIdentifier(struct Identifier * id, struct __ecereNameSpace__ecere__com__Instance * f) { @@ -1322,11 +1325,11 @@ struct { struct Identifier * id; struct Initializer * initializer; -} __attribute__ ((gcc_struct)) __anon1; -} __attribute__ ((gcc_struct)) __anon1; +} ecere_gcc_struct __anon1; +} ecere_gcc_struct __anon1; int memberAccess; void * object; -} __attribute__ ((gcc_struct)); +} ecere_gcc_struct; struct MembersInit { @@ -1338,8 +1341,8 @@ union { struct __ecereNameSpace__ecere__sys__OldList * dataMembers; struct ClassFunction * function; -} __attribute__ ((gcc_struct)) __anon1; -} __attribute__ ((gcc_struct)); +} ecere_gcc_struct __anon1; +} ecere_gcc_struct; struct ClassFunction { @@ -1361,7 +1364,7 @@ unsigned int isDestructor; unsigned int dontMangle; int id; int idCode; -} __attribute__ ((gcc_struct)); +} ecere_gcc_struct; struct InitDeclarator; @@ -1372,7 +1375,7 @@ struct InitDeclarator * next; struct Location loc; struct Declarator * declarator; struct Initializer * initializer; -} __attribute__ ((gcc_struct)); +} ecere_gcc_struct; struct External; @@ -1416,7 +1419,7 @@ struct TemplateDatatype * templateDatatype; struct DBTableEntry * dbtableEntry; struct DBIndexItem * dbindexItem; struct DBTableDef * dbtableDef; -} __attribute__ ((gcc_struct)) YYSTYPE; +} ecere_gcc_struct YYSTYPE; extern YYSTYPE yylval; @@ -1433,7 +1436,7 @@ union struct __ecereNameSpace__ecere__com__Method * method; struct __ecereNameSpace__ecere__com__Property * _property; struct __ecereNameSpace__ecere__com__Class * registered; -} __attribute__ ((gcc_struct)) __anon1; +} ecere_gcc_struct __anon1; unsigned int notYetDeclared; union { @@ -1441,20 +1444,20 @@ struct { struct External * pointerExternal; struct External * structExternal; -} __attribute__ ((gcc_struct)) __anon1; +} ecere_gcc_struct __anon1; struct { struct External * externalGet; struct External * externalSet; struct External * externalPtr; struct External * externalIsSet; -} __attribute__ ((gcc_struct)) __anon2; +} ecere_gcc_struct __anon2; struct { struct External * methodExternal; struct External * methodCodeExternal; -} __attribute__ ((gcc_struct)) __anon3; -} __attribute__ ((gcc_struct)) __anon2; +} ecere_gcc_struct __anon3; +} ecere_gcc_struct __anon2; unsigned int imported; unsigned int declaredStructSym; struct __ecereNameSpace__ecere__com__Class * _class; @@ -1482,7 +1485,7 @@ struct Context * ctx; int isIterator; struct Expression * propCategory; unsigned int mustRegister; -} __attribute__ ((gcc_struct)); +} ecere_gcc_struct; struct External { @@ -1499,13 +1502,13 @@ struct Declaration * declaration; char * importString; struct Identifier * id; struct DBTableDef * table; -} __attribute__ ((gcc_struct)) __anon1; +} ecere_gcc_struct __anon1; int importType; struct External * fwdDecl; struct __ecereNameSpace__ecere__com__Instance * outgoing; struct __ecereNameSpace__ecere__com__Instance * incoming; int nonBreakableIncoming; -} __attribute__ ((gcc_struct)); +} ecere_gcc_struct; static void OutputSpecifier(struct Specifier * spec, struct __ecereNameSpace__ecere__com__Instance * f, unsigned int typeName); @@ -2375,7 +2378,7 @@ OutputClassDef(def, f); struct __ecereNameSpace__ecere__com__Instance * __internal_ClassInst = f; __internal_ClassInst ? __internal_ClassInst->_vTbl : __ecereClass___ecereNameSpace__ecere__sys__File->_vTbl; -})[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, "} __attribute__ ((gcc_struct))"); +})[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, "} ecere_gcc_struct"); } break; } @@ -3235,7 +3238,7 @@ void OutputTree(struct __ecereNameSpace__ecere__sys__OldList * ast, struct __ece { struct External * external; -outputLine = 47; +outputLine = 50; for(external = ast->first; external; external = external->next) { switch(external->type) diff --git a/compiler/bootstrap/libec/bootstrap/pass0.c b/compiler/bootstrap/libec/bootstrap/pass0.c index e07c824..98106b9 100644 --- a/compiler/bootstrap/libec/bootstrap/pass0.c +++ b/compiler/bootstrap/libec/bootstrap/pass0.c @@ -38,11 +38,14 @@ typedef unsigned __int64 uint64; #if defined(_WIN32) # if defined(__GNUC__) || defined(__TINYC__) # define ecere_stdcall __attribute__((__stdcall__)) +# define ecere_gcc_struct __attribute__((gcc_struct)) # else # define ecere_stdcall __stdcall +# define ecere_gcc_struct # endif #else # define ecere_stdcall +# define ecere_gcc_struct #endif #include #include @@ -68,7 +71,7 @@ void * last; int count; unsigned int offset; unsigned int circ; -} __attribute__ ((gcc_struct)); +} ecere_gcc_struct; struct __ecereNameSpace__ecere__sys__BTNode; @@ -87,8 +90,8 @@ float f; double d; long long i64; uint64 ui64; -} __attribute__ ((gcc_struct)) __anon1; -} __attribute__ ((gcc_struct)); +} ecere_gcc_struct __anon1; +} ecere_gcc_struct; struct __ecereNameSpace__ecere__com__SerialBuffer { @@ -96,7 +99,7 @@ unsigned char * _buffer; unsigned int count; unsigned int _size; unsigned int pos; -} __attribute__ ((gcc_struct)); +} ecere_gcc_struct; extern void * __ecereNameSpace__ecere__com__eSystem_New(unsigned int size); @@ -142,7 +145,7 @@ int line; int charPos; int pos; int included; -} __attribute__ ((gcc_struct)); +} ecere_gcc_struct; extern char * strcat(char * , const char * ); @@ -163,7 +166,7 @@ struct __ecereNameSpace__ecere__com__LinkList void * first; void * last; int count; -} __attribute__ ((gcc_struct)); +} ecere_gcc_struct; extern char * __ecereNameSpace__ecere__sys__CopyString(const char * string); @@ -173,7 +176,7 @@ struct __ecereNameSpace__ecere__com__LinkElement { void * prev; void * next; -} __attribute__ ((gcc_struct)); +} ecere_gcc_struct; extern char * strstr(const char * , const char * ); @@ -219,7 +222,7 @@ struct Location { struct CodePosition start; struct CodePosition end; -} __attribute__ ((gcc_struct)); +} ecere_gcc_struct; void FullClassNameCat(char * output, const char * className, unsigned int includeTemplateParams) { @@ -302,7 +305,7 @@ struct __ecereNameSpace__ecere__com__LinkElement out; struct External * from; struct External * to; unsigned int breakable; -} __attribute__ ((gcc_struct)); +} ecere_gcc_struct; extern void FreeExternal(struct External * external); @@ -323,7 +326,7 @@ struct __ecereNameSpace__ecere__com__Instance void * * _vTbl; struct __ecereNameSpace__ecere__com__Class * _class; int _refCount; -} __attribute__ ((gcc_struct)); +} ecere_gcc_struct; extern long long __ecereNameSpace__ecere__com__eClass_GetProperty(struct __ecereNameSpace__ecere__com__Class * _class, const char * name); @@ -375,7 +378,7 @@ struct __ecereNameSpace__ecere__com__BTNamedLink * left; struct __ecereNameSpace__ecere__com__BTNamedLink * right; int depth; void * data; -} __attribute__ ((gcc_struct)); +} ecere_gcc_struct; struct Symbol; @@ -414,7 +417,7 @@ struct Symbol * classSym; struct Specifier * _class; char * string; struct Identifier * badID; -} __attribute__ ((gcc_struct)); +} ecere_gcc_struct; extern struct Declarator * MkDeclaratorIdentifier(struct Identifier * id); @@ -440,7 +443,7 @@ char * name; struct Symbol * symbol; struct __ecereNameSpace__ecere__sys__OldList * templateArgs; struct Specifier * nsSpec; -} __attribute__ ((gcc_struct)) __anon1; +} ecere_gcc_struct __anon1; struct { struct Identifier * id; @@ -450,12 +453,12 @@ struct __ecereNameSpace__ecere__sys__OldList * definitions; unsigned int addNameSpace; struct Context * ctx; struct ExtDecl * extDeclStruct; -} __attribute__ ((gcc_struct)) __anon2; +} ecere_gcc_struct __anon2; struct Expression * expression; struct Specifier * _class; struct TemplateParameter * templateParameter; -} __attribute__ ((gcc_struct)) __anon1; -} __attribute__ ((gcc_struct)); +} ecere_gcc_struct __anon1; +} ecere_gcc_struct; struct Declarator { @@ -473,26 +476,26 @@ struct struct Expression * exp; struct Expression * posExp; struct Attrib * attrib; -} __attribute__ ((gcc_struct)) structDecl; +} ecere_gcc_struct structDecl; struct { struct Expression * exp; struct Specifier * enumClass; -} __attribute__ ((gcc_struct)) array; +} ecere_gcc_struct array; struct { struct __ecereNameSpace__ecere__sys__OldList * parameters; -} __attribute__ ((gcc_struct)) function; +} ecere_gcc_struct function; struct { struct Pointer * pointer; -} __attribute__ ((gcc_struct)) pointer; +} ecere_gcc_struct pointer; struct { struct ExtDecl * extended; -} __attribute__ ((gcc_struct)) extended; -} __attribute__ ((gcc_struct)) __anon1; -} __attribute__ ((gcc_struct)); +} ecere_gcc_struct extended; +} ecere_gcc_struct __anon1; +} ecere_gcc_struct; extern struct Expression * QMkExpId(const char * id); @@ -534,7 +537,7 @@ const char * category; unsigned int compiled; unsigned int selfWatchable; unsigned int isWatchable; -} __attribute__ ((gcc_struct)); +} ecere_gcc_struct; extern struct Type * MkClassType(const char * name); @@ -558,10 +561,10 @@ union { struct Expression * exp; struct __ecereNameSpace__ecere__sys__OldList * list; -} __attribute__ ((gcc_struct)) __anon1; +} ecere_gcc_struct __anon1; unsigned int isConstant; struct Identifier * id; -} __attribute__ ((gcc_struct)); +} ecere_gcc_struct; extern struct InitDeclarator * MkInitDeclarator(struct Declarator * declarator, struct Initializer * initializer); @@ -586,7 +589,7 @@ void * symbol; const char * dataTypeString; struct Type * dataType; int memberAccess; -} __attribute__ ((gcc_struct)); +} ecere_gcc_struct; struct Symbol { @@ -601,7 +604,7 @@ union struct __ecereNameSpace__ecere__com__Method * method; struct __ecereNameSpace__ecere__com__Property * _property; struct __ecereNameSpace__ecere__com__Class * registered; -} __attribute__ ((gcc_struct)) __anon1; +} ecere_gcc_struct __anon1; unsigned int notYetDeclared; union { @@ -609,20 +612,20 @@ struct { struct External * pointerExternal; struct External * structExternal; -} __attribute__ ((gcc_struct)) __anon1; +} ecere_gcc_struct __anon1; struct { struct External * externalGet; struct External * externalSet; struct External * externalPtr; struct External * externalIsSet; -} __attribute__ ((gcc_struct)) __anon2; +} ecere_gcc_struct __anon2; struct { struct External * methodExternal; struct External * methodCodeExternal; -} __attribute__ ((gcc_struct)) __anon3; -} __attribute__ ((gcc_struct)) __anon2; +} ecere_gcc_struct __anon3; +} ecere_gcc_struct __anon2; unsigned int imported; unsigned int declaredStructSym; struct __ecereNameSpace__ecere__com__Class * _class; @@ -650,7 +653,7 @@ struct Context * ctx; int isIterator; struct Expression * propCategory; unsigned int mustRegister; -} __attribute__ ((gcc_struct)); +} ecere_gcc_struct; struct Type { @@ -664,7 +667,7 @@ struct { struct __ecereNameSpace__ecere__sys__OldList members; char * enumName; -} __attribute__ ((gcc_struct)) __anon1; +} ecere_gcc_struct __anon1; struct { struct Type * returnType; @@ -672,13 +675,13 @@ struct __ecereNameSpace__ecere__sys__OldList params; struct Symbol * thisClass; unsigned int staticMethod; struct TemplateParameter * thisClassTemplate; -} __attribute__ ((gcc_struct)) __anon2; +} ecere_gcc_struct __anon2; struct { struct __ecereNameSpace__ecere__com__Method * method; struct __ecereNameSpace__ecere__com__Class * methodClass; struct __ecereNameSpace__ecere__com__Class * usedClass; -} __attribute__ ((gcc_struct)) __anon3; +} ecere_gcc_struct __anon3; struct { struct Type * arrayType; @@ -686,10 +689,10 @@ int arraySize; struct Expression * arraySizeExp; unsigned int freeExp; struct Symbol * enumClass; -} __attribute__ ((gcc_struct)) __anon4; +} ecere_gcc_struct __anon4; struct Type * type; struct TemplateParameter * templateParameter; -} __attribute__ ((gcc_struct)) __anon1; +} ecere_gcc_struct __anon1; int kind; unsigned int size; char * name; @@ -716,7 +719,7 @@ unsigned int typedByReference : 1; unsigned int casted : 1; unsigned int pointerAlignment : 1; unsigned int isLong : 1; -} __attribute__ ((gcc_struct)); +} ecere_gcc_struct; extern struct __ecereNameSpace__ecere__com__Method * __ecereNameSpace__ecere__com__eClass_AddMethod(struct __ecereNameSpace__ecere__com__Class * _class, const char * name, const char * type, void * function, int declMode); @@ -746,7 +749,7 @@ unsigned int isDestructor; unsigned int dontMangle; int id; int idCode; -} __attribute__ ((gcc_struct)); +} ecere_gcc_struct; struct Statement { @@ -761,51 +764,51 @@ struct { struct Identifier * id; struct Statement * stmt; -} __attribute__ ((gcc_struct)) labeled; +} ecere_gcc_struct labeled; struct { struct Expression * exp; struct Statement * stmt; -} __attribute__ ((gcc_struct)) caseStmt; +} ecere_gcc_struct caseStmt; struct { struct __ecereNameSpace__ecere__sys__OldList * declarations; struct __ecereNameSpace__ecere__sys__OldList * statements; struct Context * context; unsigned int isSwitch; -} __attribute__ ((gcc_struct)) compound; +} ecere_gcc_struct compound; struct { struct __ecereNameSpace__ecere__sys__OldList * exp; struct Statement * stmt; struct Statement * elseStmt; -} __attribute__ ((gcc_struct)) ifStmt; +} ecere_gcc_struct ifStmt; struct { struct __ecereNameSpace__ecere__sys__OldList * exp; struct Statement * stmt; -} __attribute__ ((gcc_struct)) switchStmt; +} ecere_gcc_struct switchStmt; struct { struct __ecereNameSpace__ecere__sys__OldList * exp; struct Statement * stmt; -} __attribute__ ((gcc_struct)) whileStmt; +} ecere_gcc_struct whileStmt; struct { struct __ecereNameSpace__ecere__sys__OldList * exp; struct Statement * stmt; -} __attribute__ ((gcc_struct)) doWhile; +} ecere_gcc_struct doWhile; struct { struct Statement * init; struct Statement * check; struct __ecereNameSpace__ecere__sys__OldList * increment; struct Statement * stmt; -} __attribute__ ((gcc_struct)) forStmt; +} ecere_gcc_struct forStmt; struct { struct Identifier * id; -} __attribute__ ((gcc_struct)) gotoStmt; +} ecere_gcc_struct gotoStmt; struct { struct Specifier * spec; @@ -813,23 +816,23 @@ char * statements; struct __ecereNameSpace__ecere__sys__OldList * inputFields; struct __ecereNameSpace__ecere__sys__OldList * outputFields; struct __ecereNameSpace__ecere__sys__OldList * clobberedFields; -} __attribute__ ((gcc_struct)) asmStmt; +} ecere_gcc_struct asmStmt; struct { struct Expression * watcher; struct Expression * object; struct __ecereNameSpace__ecere__sys__OldList * watches; -} __attribute__ ((gcc_struct)) _watch; +} ecere_gcc_struct _watch; struct { struct Identifier * id; struct __ecereNameSpace__ecere__sys__OldList * exp; struct __ecereNameSpace__ecere__sys__OldList * filter; struct Statement * stmt; -} __attribute__ ((gcc_struct)) forEachStmt; +} ecere_gcc_struct forEachStmt; struct Declaration * decl; -} __attribute__ ((gcc_struct)) __anon1; -} __attribute__ ((gcc_struct)); +} ecere_gcc_struct __anon1; +} ecere_gcc_struct; extern struct Statement * MkExpressionStmt(struct __ecereNameSpace__ecere__sys__OldList * expressions); @@ -847,7 +850,7 @@ struct __ecereNameSpace__ecere__sys__BTNode * root; int count; int (* CompareKey)(struct __ecereNameSpace__ecere__sys__BinaryTree * tree, uintptr_t a, uintptr_t b); void (* FreeKey)(void * key); -} __attribute__ ((gcc_struct)); +} ecere_gcc_struct; struct __ecereNameSpace__ecere__sys__BTNode * __ecereMethod___ecereNameSpace__ecere__sys__BinaryTree_FindString(struct __ecereNameSpace__ecere__sys__BinaryTree * this, const char * key); @@ -863,7 +866,7 @@ struct { const char * dataTypeString; struct __ecereNameSpace__ecere__com__Class * dataTypeClass; -} __attribute__ ((gcc_struct)) __anon1; +} ecere_gcc_struct __anon1; struct __ecereNameSpace__ecere__com__DataValue expression; struct { @@ -873,10 +876,10 @@ union struct __ecereNameSpace__ecere__com__DataMember * member; struct __ecereNameSpace__ecere__com__Property * prop; struct __ecereNameSpace__ecere__com__Method * method; -} __attribute__ ((gcc_struct)) __anon1; -} __attribute__ ((gcc_struct)) __anon2; -} __attribute__ ((gcc_struct)) __anon1; -} __attribute__ ((gcc_struct)); +} ecere_gcc_struct __anon1; +} ecere_gcc_struct __anon2; +} ecere_gcc_struct __anon1; +} ecere_gcc_struct; struct __ecereNameSpace__ecere__com__DataMember { @@ -898,7 +901,7 @@ struct __ecereNameSpace__ecere__sys__BinaryTree membersAlpha; int memberOffset; short structAlignment; short pointerAlignment; -} __attribute__ ((gcc_struct)); +} ecere_gcc_struct; extern struct __ecereNameSpace__ecere__com__DataMember * __ecereNameSpace__ecere__com__eClass_AddDataMember(struct __ecereNameSpace__ecere__com__Class * _class, const char * name, const char * type, unsigned int size, unsigned int alignment, int declMode); @@ -929,7 +932,7 @@ struct __ecereNameSpace__ecere__sys__OldList * qualifiers; struct Declarator * declarator; int classObjectType; struct Expression * bitCount; -} __attribute__ ((gcc_struct)); +} ecere_gcc_struct; extern struct TypeName * MkTypeName(struct __ecereNameSpace__ecere__sys__OldList * qualifiers, struct Declarator * declarator); @@ -956,7 +959,7 @@ struct __ecereNameSpace__ecere__sys__BinaryTree templateTypes; struct ClassDefinition * classDef; unsigned int templateTypesOnly; unsigned int hasNameSpace; -} __attribute__ ((gcc_struct)); +} ecere_gcc_struct; struct ClassDefinition { @@ -971,7 +974,7 @@ struct Location blockStart; struct Location nameLoc; int declMode; unsigned int deleteWatchable; -} __attribute__ ((gcc_struct)); +} ecere_gcc_struct; struct Instantiation; @@ -987,7 +990,7 @@ struct { char * constant; struct Identifier * identifier; -} __attribute__ ((gcc_struct)) __anon1; +} ecere_gcc_struct __anon1; struct Statement * compound; struct Instantiation * instance; struct @@ -995,86 +998,86 @@ struct char * string; unsigned int intlString; unsigned int wideString; -} __attribute__ ((gcc_struct)) __anon2; +} ecere_gcc_struct __anon2; struct __ecereNameSpace__ecere__sys__OldList * list; struct { struct __ecereNameSpace__ecere__sys__OldList * specifiers; struct Declarator * decl; -} __attribute__ ((gcc_struct)) _classExp; +} ecere_gcc_struct _classExp; struct { struct Identifier * id; -} __attribute__ ((gcc_struct)) classData; +} ecere_gcc_struct classData; struct { struct Expression * exp; struct __ecereNameSpace__ecere__sys__OldList * arguments; struct Location argLoc; -} __attribute__ ((gcc_struct)) call; +} ecere_gcc_struct call; struct { struct Expression * exp; struct __ecereNameSpace__ecere__sys__OldList * index; -} __attribute__ ((gcc_struct)) index; +} ecere_gcc_struct index; struct { struct Expression * exp; struct Identifier * member; int memberType; unsigned int thisPtr; -} __attribute__ ((gcc_struct)) member; +} ecere_gcc_struct member; struct { int op; struct Expression * exp1; struct Expression * exp2; -} __attribute__ ((gcc_struct)) op; +} ecere_gcc_struct op; struct TypeName * typeName; struct Specifier * _class; struct { struct TypeName * typeName; struct Expression * exp; -} __attribute__ ((gcc_struct)) cast; +} ecere_gcc_struct cast; struct { struct Expression * cond; struct __ecereNameSpace__ecere__sys__OldList * exp; struct Expression * elseExp; -} __attribute__ ((gcc_struct)) cond; +} ecere_gcc_struct cond; struct { struct TypeName * typeName; struct Expression * size; -} __attribute__ ((gcc_struct)) _new; +} ecere_gcc_struct _new; struct { struct TypeName * typeName; struct Expression * size; struct Expression * exp; -} __attribute__ ((gcc_struct)) _renew; +} ecere_gcc_struct _renew; struct { char * table; struct Identifier * id; -} __attribute__ ((gcc_struct)) db; +} ecere_gcc_struct db; struct { struct Expression * ds; struct Expression * name; -} __attribute__ ((gcc_struct)) dbopen; +} ecere_gcc_struct dbopen; struct { struct TypeName * typeName; struct Initializer * initializer; -} __attribute__ ((gcc_struct)) initializer; +} ecere_gcc_struct initializer; struct { struct Expression * exp; struct TypeName * typeName; -} __attribute__ ((gcc_struct)) vaArg; -} __attribute__ ((gcc_struct)) __anon1; +} ecere_gcc_struct vaArg; +} ecere_gcc_struct __anon1; unsigned int debugValue; struct __ecereNameSpace__ecere__com__DataValue val; uint64 address; @@ -1090,7 +1093,7 @@ unsigned int needCast; unsigned int thisPtr; unsigned int opDestType; unsigned int needTemplateCast; -} __attribute__ ((gcc_struct)); +} ecere_gcc_struct; struct Instantiation { @@ -1107,7 +1110,7 @@ unsigned char * data; struct Location nameLoc; struct Location insideLoc; unsigned int built; -} __attribute__ ((gcc_struct)); +} ecere_gcc_struct; struct Declaration { @@ -1121,18 +1124,18 @@ struct { struct __ecereNameSpace__ecere__sys__OldList * specifiers; struct __ecereNameSpace__ecere__sys__OldList * declarators; -} __attribute__ ((gcc_struct)) __anon1; +} ecere_gcc_struct __anon1; struct Instantiation * inst; struct { struct Identifier * id; struct Expression * exp; -} __attribute__ ((gcc_struct)) __anon2; -} __attribute__ ((gcc_struct)) __anon1; +} ecere_gcc_struct __anon2; +} ecere_gcc_struct __anon1; struct Specifier * extStorage; struct Symbol * symbol; int declMode; -} __attribute__ ((gcc_struct)); +} ecere_gcc_struct; extern struct Expression * MkExpInstance(struct Instantiation * inst); @@ -1148,8 +1151,8 @@ union { struct __ecereNameSpace__ecere__sys__OldList * dataMembers; struct ClassFunction * function; -} __attribute__ ((gcc_struct)) __anon1; -} __attribute__ ((gcc_struct)); +} ecere_gcc_struct __anon1; +} ecere_gcc_struct; struct MemberInit; @@ -1164,7 +1167,7 @@ struct Initializer * initializer; unsigned int used; unsigned int variable; unsigned int takeOutExp; -} __attribute__ ((gcc_struct)); +} ecere_gcc_struct; static void CheckPublicExpression(struct Expression * exp, int access); @@ -1385,11 +1388,11 @@ struct { struct Identifier * id; struct Initializer * initializer; -} __attribute__ ((gcc_struct)) __anon1; -} __attribute__ ((gcc_struct)) __anon1; +} ecere_gcc_struct __anon1; +} ecere_gcc_struct __anon1; int memberAccess; void * object; -} __attribute__ ((gcc_struct)); +} ecere_gcc_struct; struct PropertyDef { @@ -1409,8 +1412,8 @@ struct unsigned int conversion : 1; unsigned int isWatchable : 1; unsigned int isDBProp : 1; -} __attribute__ ((gcc_struct)) __anon1; -} __attribute__ ((gcc_struct)); +} ecere_gcc_struct __anon1; +} ecere_gcc_struct; static void CheckMembersDefinitions(struct __ecereNameSpace__ecere__com__Class * regClass, struct __ecereNameSpace__ecere__com__DataMember * member, struct __ecereNameSpace__ecere__sys__OldList * definitions, int access) { @@ -1531,7 +1534,7 @@ struct TemplateDatatype * templateDatatype; struct DBTableEntry * dbtableEntry; struct DBIndexItem * dbindexItem; struct DBTableDef * dbtableDef; -} __attribute__ ((gcc_struct)) YYSTYPE; +} ecere_gcc_struct YYSTYPE; extern YYSTYPE yylval; @@ -1550,13 +1553,13 @@ struct Declaration * declaration; char * importString; struct Identifier * id; struct DBTableDef * table; -} __attribute__ ((gcc_struct)) __anon1; +} ecere_gcc_struct __anon1; int importType; struct External * fwdDecl; struct __ecereNameSpace__ecere__com__Instance * outgoing; struct __ecereNameSpace__ecere__com__Instance * incoming; int nonBreakableIncoming; -} __attribute__ ((gcc_struct)); +} ecere_gcc_struct; struct FunctionDefinition { @@ -1574,7 +1577,7 @@ struct Type * type; struct Symbol * propSet; int tempCount; unsigned int propertyNoThis; -} __attribute__ ((gcc_struct)); +} ecere_gcc_struct; void __ecereMethod_External_CreateUniqueEdge(struct External * this, struct External * from, unsigned int soft); @@ -1592,7 +1595,7 @@ struct __ecereNameSpace__ecere__sys__BinaryTree nameSpaces; struct __ecereNameSpace__ecere__sys__BinaryTree classes; struct __ecereNameSpace__ecere__sys__BinaryTree defines; struct __ecereNameSpace__ecere__sys__BinaryTree functions; -} __attribute__ ((gcc_struct)); +} ecere_gcc_struct; struct __ecereNameSpace__ecere__com__Class { @@ -1651,7 +1654,7 @@ struct __ecereNameSpace__ecere__sys__OldList templatized; int numParams; unsigned int isInstanceClass; unsigned int byValueSystemClass; -} __attribute__ ((gcc_struct)); +} ecere_gcc_struct; struct __ecereNameSpace__ecere__com__Application { @@ -1662,7 +1665,7 @@ unsigned int isGUIApp; struct __ecereNameSpace__ecere__sys__OldList allModules; char * parsedCommand; struct __ecereNameSpace__ecere__com__NameSpace systemNameSpace; -} __attribute__ ((gcc_struct)); +} ecere_gcc_struct; static unsigned int NameSpaceContained(struct __ecereNameSpace__ecere__com__NameSpace * ns, struct __ecereNameSpace__ecere__com__NameSpace * parent) { @@ -1706,7 +1709,7 @@ int importType; int origImportType; struct __ecereNameSpace__ecere__com__NameSpace privateNameSpace; struct __ecereNameSpace__ecere__com__NameSpace publicNameSpace; -} __attribute__ ((gcc_struct)); +} ecere_gcc_struct; void __ecereUnregisterModule_pass0(struct __ecereNameSpace__ecere__com__Instance * module) { diff --git a/compiler/bootstrap/libec/bootstrap/pass1.c b/compiler/bootstrap/libec/bootstrap/pass1.c index b323128..df6d22b 100644 --- a/compiler/bootstrap/libec/bootstrap/pass1.c +++ b/compiler/bootstrap/libec/bootstrap/pass1.c @@ -38,11 +38,14 @@ typedef unsigned __int64 uint64; #if defined(_WIN32) # if defined(__GNUC__) || defined(__TINYC__) # define ecere_stdcall __attribute__((__stdcall__)) +# define ecere_gcc_struct __attribute__((gcc_struct)) # else # define ecere_stdcall __stdcall +# define ecere_gcc_struct # endif #else # define ecere_stdcall +# define ecere_gcc_struct #endif #include #include @@ -84,7 +87,7 @@ void * last; int count; unsigned int offset; unsigned int circ; -} __attribute__ ((gcc_struct)); +} ecere_gcc_struct; struct __ecereNameSpace__ecere__com__DataValue { @@ -101,8 +104,8 @@ float f; double d; long long i64; uint64 ui64; -} __attribute__ ((gcc_struct)) __anon1; -} __attribute__ ((gcc_struct)); +} ecere_gcc_struct __anon1; +} ecere_gcc_struct; struct __ecereNameSpace__ecere__com__SerialBuffer { @@ -110,7 +113,7 @@ unsigned char * _buffer; unsigned int count; unsigned int _size; unsigned int pos; -} __attribute__ ((gcc_struct)); +} ecere_gcc_struct; extern void * __ecereNameSpace__ecere__com__eSystem_New(unsigned int size); @@ -154,7 +157,7 @@ int line; int charPos; int pos; int included; -} __attribute__ ((gcc_struct)); +} ecere_gcc_struct; struct ModuleImport; @@ -165,7 +168,7 @@ struct __ecereNameSpace__ecere__com__LinkList void * first; void * last; int count; -} __attribute__ ((gcc_struct)); +} ecere_gcc_struct; extern void Compiler_Error(const char * format, ...); @@ -243,7 +246,7 @@ struct __ecereNameSpace__ecere__com__EnumClassData { struct __ecereNameSpace__ecere__sys__OldList values; long long largest; -} __attribute__ ((gcc_struct)); +} ecere_gcc_struct; unsigned int __ecereMethod___ecereNameSpace__ecere__sys__OldList_Insert(struct __ecereNameSpace__ecere__sys__OldList * this, void * prevItem, void * item); @@ -263,7 +266,7 @@ struct Location { struct CodePosition start; struct CodePosition end; -} __attribute__ ((gcc_struct)); +} ecere_gcc_struct; extern struct Location yylloc; @@ -336,7 +339,7 @@ struct __ecereNameSpace__ecere__sys__BTNode * parent; struct __ecereNameSpace__ecere__sys__BTNode * left; struct __ecereNameSpace__ecere__sys__BTNode * right; int depth; -} __attribute__ ((gcc_struct)); +} ecere_gcc_struct; struct __ecereNameSpace__ecere__sys__BTNode * __ecereProp___ecereNameSpace__ecere__sys__BTNode_Get_next(struct __ecereNameSpace__ecere__sys__BTNode * this); @@ -347,7 +350,7 @@ struct __ecereNameSpace__ecere__com__Instance void * * _vTbl; struct __ecereNameSpace__ecere__com__Class * _class; int _refCount; -} __attribute__ ((gcc_struct)); +} ecere_gcc_struct; extern long long __ecereNameSpace__ecere__com__eClass_GetProperty(struct __ecereNameSpace__ecere__com__Class * _class, const char * name); @@ -369,7 +372,7 @@ struct __ecereNameSpace__ecere__com__Iterator { struct __ecereNameSpace__ecere__com__Instance * container; struct __ecereNameSpace__ecere__com__IteratorPointer * pointer; -} __attribute__ ((gcc_struct)); +} ecere_gcc_struct; int __ecereVMethodID___ecereNameSpace__ecere__com__Container_Add; @@ -442,7 +445,7 @@ const char * category; unsigned int compiled; unsigned int selfWatchable; unsigned int isWatchable; -} __attribute__ ((gcc_struct)); +} ecere_gcc_struct; struct __ecereNameSpace__ecere__com__Method { @@ -459,7 +462,7 @@ void * symbol; const char * dataTypeString; struct Type * dataType; int memberAccess; -} __attribute__ ((gcc_struct)); +} ecere_gcc_struct; extern struct Type * ProcessTypeString(const char * string, unsigned int staticMethod); @@ -486,7 +489,7 @@ union struct __ecereNameSpace__ecere__com__Method * method; struct __ecereNameSpace__ecere__com__Property * _property; struct __ecereNameSpace__ecere__com__Class * registered; -} __attribute__ ((gcc_struct)) __anon1; +} ecere_gcc_struct __anon1; unsigned int notYetDeclared; union { @@ -494,20 +497,20 @@ struct { struct External * pointerExternal; struct External * structExternal; -} __attribute__ ((gcc_struct)) __anon1; +} ecere_gcc_struct __anon1; struct { struct External * externalGet; struct External * externalSet; struct External * externalPtr; struct External * externalIsSet; -} __attribute__ ((gcc_struct)) __anon2; +} ecere_gcc_struct __anon2; struct { struct External * methodExternal; struct External * methodCodeExternal; -} __attribute__ ((gcc_struct)) __anon3; -} __attribute__ ((gcc_struct)) __anon2; +} ecere_gcc_struct __anon3; +} ecere_gcc_struct __anon2; unsigned int imported; unsigned int declaredStructSym; struct __ecereNameSpace__ecere__com__Class * _class; @@ -535,7 +538,7 @@ struct Context * ctx; int isIterator; struct Expression * propCategory; unsigned int mustRegister; -} __attribute__ ((gcc_struct)); +} ecere_gcc_struct; extern struct Symbol * FindClass(const char * name); @@ -557,7 +560,7 @@ struct TemplateDatatype { struct __ecereNameSpace__ecere__sys__OldList * specifiers; struct Declarator * decl; -} __attribute__ ((gcc_struct)); +} ecere_gcc_struct; struct Identifier; @@ -577,26 +580,26 @@ struct struct Expression * exp; struct Expression * posExp; struct Attrib * attrib; -} __attribute__ ((gcc_struct)) structDecl; +} ecere_gcc_struct structDecl; struct { struct Expression * exp; struct Specifier * enumClass; -} __attribute__ ((gcc_struct)) array; +} ecere_gcc_struct array; struct { struct __ecereNameSpace__ecere__sys__OldList * parameters; -} __attribute__ ((gcc_struct)) function; +} ecere_gcc_struct function; struct { struct Pointer * pointer; -} __attribute__ ((gcc_struct)) pointer; +} ecere_gcc_struct pointer; struct { struct ExtDecl * extended; -} __attribute__ ((gcc_struct)) extended; -} __attribute__ ((gcc_struct)) __anon1; -} __attribute__ ((gcc_struct)); +} ecere_gcc_struct extended; +} ecere_gcc_struct __anon1; +} ecere_gcc_struct; extern struct Declarator * MkDeclaratorIdentifier(struct Identifier * id); @@ -617,7 +620,7 @@ struct Symbol * classSym; struct Specifier * _class; char * string; struct Identifier * badID; -} __attribute__ ((gcc_struct)); +} ecere_gcc_struct; extern struct Identifier * GetDeclId(struct Declarator * decl); @@ -626,7 +629,7 @@ struct ClassPropertyValue struct __ecereNameSpace__ecere__com__Class * regClass; struct Identifier * id; struct Expression * exp; -} __attribute__ ((gcc_struct)); +} ecere_gcc_struct; extern void FreeIdentifier(struct Identifier * id); @@ -638,7 +641,7 @@ struct __ecereNameSpace__ecere__sys__NamedLink64 * prev; struct __ecereNameSpace__ecere__sys__NamedLink64 * next; char * name; long long data; -} __attribute__ ((gcc_struct)); +} ecere_gcc_struct; struct __ecereNameSpace__ecere__sys__OldLink; @@ -647,7 +650,7 @@ struct __ecereNameSpace__ecere__sys__OldLink struct __ecereNameSpace__ecere__sys__OldLink * prev; struct __ecereNameSpace__ecere__sys__OldLink * next; void * data; -} __attribute__ ((gcc_struct)); +} ecere_gcc_struct; struct ClassFunction; @@ -671,7 +674,7 @@ unsigned int isDestructor; unsigned int dontMangle; int id; int idCode; -} __attribute__ ((gcc_struct)); +} ecere_gcc_struct; extern struct ClassFunction * MkClassFunction(struct __ecereNameSpace__ecere__sys__OldList * specifiers, struct Specifier * _class, struct Declarator * decl, struct __ecereNameSpace__ecere__sys__OldList * declList); @@ -687,7 +690,7 @@ struct Location loc; struct Statement * compound; struct __ecereNameSpace__ecere__sys__OldList * properties; unsigned int deleteWatch; -} __attribute__ ((gcc_struct)); +} ecere_gcc_struct; extern void FreePropertyWatch(struct PropertyWatch * watcher); @@ -706,51 +709,51 @@ struct { struct Identifier * id; struct Statement * stmt; -} __attribute__ ((gcc_struct)) labeled; +} ecere_gcc_struct labeled; struct { struct Expression * exp; struct Statement * stmt; -} __attribute__ ((gcc_struct)) caseStmt; +} ecere_gcc_struct caseStmt; struct { struct __ecereNameSpace__ecere__sys__OldList * declarations; struct __ecereNameSpace__ecere__sys__OldList * statements; struct Context * context; unsigned int isSwitch; -} __attribute__ ((gcc_struct)) compound; +} ecere_gcc_struct compound; struct { struct __ecereNameSpace__ecere__sys__OldList * exp; struct Statement * stmt; struct Statement * elseStmt; -} __attribute__ ((gcc_struct)) ifStmt; +} ecere_gcc_struct ifStmt; struct { struct __ecereNameSpace__ecere__sys__OldList * exp; struct Statement * stmt; -} __attribute__ ((gcc_struct)) switchStmt; +} ecere_gcc_struct switchStmt; struct { struct __ecereNameSpace__ecere__sys__OldList * exp; struct Statement * stmt; -} __attribute__ ((gcc_struct)) whileStmt; +} ecere_gcc_struct whileStmt; struct { struct __ecereNameSpace__ecere__sys__OldList * exp; struct Statement * stmt; -} __attribute__ ((gcc_struct)) doWhile; +} ecere_gcc_struct doWhile; struct { struct Statement * init; struct Statement * check; struct __ecereNameSpace__ecere__sys__OldList * increment; struct Statement * stmt; -} __attribute__ ((gcc_struct)) forStmt; +} ecere_gcc_struct forStmt; struct { struct Identifier * id; -} __attribute__ ((gcc_struct)) gotoStmt; +} ecere_gcc_struct gotoStmt; struct { struct Specifier * spec; @@ -758,23 +761,23 @@ char * statements; struct __ecereNameSpace__ecere__sys__OldList * inputFields; struct __ecereNameSpace__ecere__sys__OldList * outputFields; struct __ecereNameSpace__ecere__sys__OldList * clobberedFields; -} __attribute__ ((gcc_struct)) asmStmt; +} ecere_gcc_struct asmStmt; struct { struct Expression * watcher; struct Expression * object; struct __ecereNameSpace__ecere__sys__OldList * watches; -} __attribute__ ((gcc_struct)) _watch; +} ecere_gcc_struct _watch; struct { struct Identifier * id; struct __ecereNameSpace__ecere__sys__OldList * exp; struct __ecereNameSpace__ecere__sys__OldList * filter; struct Statement * stmt; -} __attribute__ ((gcc_struct)) forEachStmt; +} ecere_gcc_struct forEachStmt; struct Declaration * decl; -} __attribute__ ((gcc_struct)) __anon1; -} __attribute__ ((gcc_struct)); +} ecere_gcc_struct __anon1; +} ecere_gcc_struct; extern struct Declaration * MkDeclaration(struct __ecereNameSpace__ecere__sys__OldList * specifiers, struct __ecereNameSpace__ecere__sys__OldList * initDeclarators); @@ -790,18 +793,18 @@ struct { struct __ecereNameSpace__ecere__sys__OldList * specifiers; struct __ecereNameSpace__ecere__sys__OldList * declarators; -} __attribute__ ((gcc_struct)) __anon1; +} ecere_gcc_struct __anon1; struct Instantiation * inst; struct { struct Identifier * id; struct Expression * exp; -} __attribute__ ((gcc_struct)) __anon2; -} __attribute__ ((gcc_struct)) __anon1; +} ecere_gcc_struct __anon2; +} ecere_gcc_struct __anon1; struct Specifier * extStorage; struct Symbol * symbol; int declMode; -} __attribute__ ((gcc_struct)); +} ecere_gcc_struct; struct Initializer; @@ -821,10 +824,10 @@ union { struct Expression * exp; struct __ecereNameSpace__ecere__sys__OldList * list; -} __attribute__ ((gcc_struct)) __anon1; +} ecere_gcc_struct __anon1; unsigned int isConstant; struct Identifier * id; -} __attribute__ ((gcc_struct)); +} ecere_gcc_struct; struct FunctionDefinition; @@ -846,7 +849,7 @@ struct Type * type; struct Symbol * propSet; int tempCount; unsigned int propertyNoThis; -} __attribute__ ((gcc_struct)); +} ecere_gcc_struct; extern void ProcessFunctionBody(struct FunctionDefinition * func, struct Statement * body); @@ -863,7 +866,7 @@ struct __ecereNameSpace__ecere__sys__OldList * qualifiers; struct Declarator * declarator; int classObjectType; struct Expression * bitCount; -} __attribute__ ((gcc_struct)); +} ecere_gcc_struct; extern struct TypeName * MkTypeName(struct __ecereNameSpace__ecere__sys__OldList * qualifiers, struct Declarator * declarator); @@ -883,7 +886,7 @@ struct { char * constant; struct Identifier * identifier; -} __attribute__ ((gcc_struct)) __anon1; +} ecere_gcc_struct __anon1; struct Statement * compound; struct Instantiation * instance; struct @@ -891,86 +894,86 @@ struct char * string; unsigned int intlString; unsigned int wideString; -} __attribute__ ((gcc_struct)) __anon2; +} ecere_gcc_struct __anon2; struct __ecereNameSpace__ecere__sys__OldList * list; struct { struct __ecereNameSpace__ecere__sys__OldList * specifiers; struct Declarator * decl; -} __attribute__ ((gcc_struct)) _classExp; +} ecere_gcc_struct _classExp; struct { struct Identifier * id; -} __attribute__ ((gcc_struct)) classData; +} ecere_gcc_struct classData; struct { struct Expression * exp; struct __ecereNameSpace__ecere__sys__OldList * arguments; struct Location argLoc; -} __attribute__ ((gcc_struct)) call; +} ecere_gcc_struct call; struct { struct Expression * exp; struct __ecereNameSpace__ecere__sys__OldList * index; -} __attribute__ ((gcc_struct)) index; +} ecere_gcc_struct index; struct { struct Expression * exp; struct Identifier * member; int memberType; unsigned int thisPtr; -} __attribute__ ((gcc_struct)) member; +} ecere_gcc_struct member; struct { int op; struct Expression * exp1; struct Expression * exp2; -} __attribute__ ((gcc_struct)) op; +} ecere_gcc_struct op; struct TypeName * typeName; struct Specifier * _class; struct { struct TypeName * typeName; struct Expression * exp; -} __attribute__ ((gcc_struct)) cast; +} ecere_gcc_struct cast; struct { struct Expression * cond; struct __ecereNameSpace__ecere__sys__OldList * exp; struct Expression * elseExp; -} __attribute__ ((gcc_struct)) cond; +} ecere_gcc_struct cond; struct { struct TypeName * typeName; struct Expression * size; -} __attribute__ ((gcc_struct)) _new; +} ecere_gcc_struct _new; struct { struct TypeName * typeName; struct Expression * size; struct Expression * exp; -} __attribute__ ((gcc_struct)) _renew; +} ecere_gcc_struct _renew; struct { char * table; struct Identifier * id; -} __attribute__ ((gcc_struct)) db; +} ecere_gcc_struct db; struct { struct Expression * ds; struct Expression * name; -} __attribute__ ((gcc_struct)) dbopen; +} ecere_gcc_struct dbopen; struct { struct TypeName * typeName; struct Initializer * initializer; -} __attribute__ ((gcc_struct)) initializer; +} ecere_gcc_struct initializer; struct { struct Expression * exp; struct TypeName * typeName; -} __attribute__ ((gcc_struct)) vaArg; -} __attribute__ ((gcc_struct)) __anon1; +} ecere_gcc_struct vaArg; +} ecere_gcc_struct __anon1; unsigned int debugValue; struct __ecereNameSpace__ecere__com__DataValue val; uint64 address; @@ -986,7 +989,7 @@ unsigned int needCast; unsigned int thisPtr; unsigned int opDestType; unsigned int needTemplateCast; -} __attribute__ ((gcc_struct)); +} ecere_gcc_struct; struct Operand; @@ -1027,7 +1030,7 @@ unsigned int (* Sma)(struct Expression *, struct Operand *, struct Operand *); unsigned int (* GrtEqu)(struct Expression *, struct Operand *, struct Operand *); unsigned int (* SmaEqu)(struct Expression *, struct Operand *, struct Operand *); unsigned int (* Cond)(struct Expression *, struct Operand *, struct Operand *, struct Operand *); -} __attribute__ ((gcc_struct)); +} ecere_gcc_struct; struct Operand { @@ -1046,9 +1049,9 @@ float f; double d; long long i64; uint64 ui64; -} __attribute__ ((gcc_struct)) __anon1; +} ecere_gcc_struct __anon1; struct OpTable ops; -} __attribute__ ((gcc_struct)); +} ecere_gcc_struct; extern struct Operand GetOperand(struct Expression * exp); @@ -1060,7 +1063,7 @@ struct __ecereNameSpace__ecere__sys__BTNode * root; int count; int (* CompareKey)(struct __ecereNameSpace__ecere__sys__BinaryTree * tree, uintptr_t a, uintptr_t b); void (* FreeKey)(void * key); -} __attribute__ ((gcc_struct)); +} ecere_gcc_struct; void __ecereMethod___ecereNameSpace__ecere__sys__BinaryTree_Remove(struct __ecereNameSpace__ecere__sys__BinaryTree * this, struct __ecereNameSpace__ecere__sys__BTNode * node); @@ -1084,7 +1087,7 @@ char * name; struct Symbol * symbol; struct __ecereNameSpace__ecere__sys__OldList * templateArgs; struct Specifier * nsSpec; -} __attribute__ ((gcc_struct)) __anon1; +} ecere_gcc_struct __anon1; struct { struct Identifier * id; @@ -1094,12 +1097,12 @@ struct __ecereNameSpace__ecere__sys__OldList * definitions; unsigned int addNameSpace; struct Context * ctx; struct ExtDecl * extDeclStruct; -} __attribute__ ((gcc_struct)) __anon2; +} ecere_gcc_struct __anon2; struct Expression * expression; struct Specifier * _class; struct TemplateParameter * templateParameter; -} __attribute__ ((gcc_struct)) __anon1; -} __attribute__ ((gcc_struct)); +} ecere_gcc_struct __anon1; +} ecere_gcc_struct; struct Type { @@ -1113,7 +1116,7 @@ struct { struct __ecereNameSpace__ecere__sys__OldList members; char * enumName; -} __attribute__ ((gcc_struct)) __anon1; +} ecere_gcc_struct __anon1; struct { struct Type * returnType; @@ -1121,13 +1124,13 @@ struct __ecereNameSpace__ecere__sys__OldList params; struct Symbol * thisClass; unsigned int staticMethod; struct TemplateParameter * thisClassTemplate; -} __attribute__ ((gcc_struct)) __anon2; +} ecere_gcc_struct __anon2; struct { struct __ecereNameSpace__ecere__com__Method * method; struct __ecereNameSpace__ecere__com__Class * methodClass; struct __ecereNameSpace__ecere__com__Class * usedClass; -} __attribute__ ((gcc_struct)) __anon3; +} ecere_gcc_struct __anon3; struct { struct Type * arrayType; @@ -1135,10 +1138,10 @@ int arraySize; struct Expression * arraySizeExp; unsigned int freeExp; struct Symbol * enumClass; -} __attribute__ ((gcc_struct)) __anon4; +} ecere_gcc_struct __anon4; struct Type * type; struct TemplateParameter * templateParameter; -} __attribute__ ((gcc_struct)) __anon1; +} ecere_gcc_struct __anon1; int kind; unsigned int size; char * name; @@ -1165,7 +1168,7 @@ unsigned int typedByReference : 1; unsigned int casted : 1; unsigned int pointerAlignment : 1; unsigned int isLong : 1; -} __attribute__ ((gcc_struct)); +} ecere_gcc_struct; unsigned int __ecereProp_Type_Get_isPointerTypeSize(struct Type * this); @@ -1195,7 +1198,7 @@ struct { const char * dataTypeString; struct __ecereNameSpace__ecere__com__Class * dataTypeClass; -} __attribute__ ((gcc_struct)) __anon1; +} ecere_gcc_struct __anon1; struct __ecereNameSpace__ecere__com__DataValue expression; struct { @@ -1205,10 +1208,10 @@ union struct __ecereNameSpace__ecere__com__DataMember * member; struct __ecereNameSpace__ecere__com__Property * prop; struct __ecereNameSpace__ecere__com__Method * method; -} __attribute__ ((gcc_struct)) __anon1; -} __attribute__ ((gcc_struct)) __anon2; -} __attribute__ ((gcc_struct)) __anon1; -} __attribute__ ((gcc_struct)); +} ecere_gcc_struct __anon1; +} ecere_gcc_struct __anon2; +} ecere_gcc_struct __anon1; +} ecere_gcc_struct; struct __ecereNameSpace__ecere__com__DataMember { @@ -1230,7 +1233,7 @@ struct __ecereNameSpace__ecere__sys__BinaryTree membersAlpha; int memberOffset; short structAlignment; short pointerAlignment; -} __attribute__ ((gcc_struct)); +} ecere_gcc_struct; extern struct __ecereNameSpace__ecere__com__ClassTemplateArgument * FindTemplateArg(struct __ecereNameSpace__ecere__com__Class * _class, struct TemplateParameter * param); @@ -1252,7 +1255,7 @@ int type; int size; int pos; uint64 mask; -} __attribute__ ((gcc_struct)); +} ecere_gcc_struct; struct __ecereNameSpace__ecere__com__ClassProperty; @@ -1268,7 +1271,7 @@ long long (* Get)(struct __ecereNameSpace__ecere__com__Class *); const char * dataTypeString; struct Type * dataType; unsigned int constant; -} __attribute__ ((gcc_struct)); +} ecere_gcc_struct; struct ClassDefinition; @@ -1287,13 +1290,13 @@ struct Declaration * declaration; char * importString; struct Identifier * id; struct DBTableDef * table; -} __attribute__ ((gcc_struct)) __anon1; +} ecere_gcc_struct __anon1; int importType; struct External * fwdDecl; struct __ecereNameSpace__ecere__com__Instance * outgoing; struct __ecereNameSpace__ecere__com__Instance * incoming; int nonBreakableIncoming; -} __attribute__ ((gcc_struct)); +} ecere_gcc_struct; struct Context { @@ -1308,7 +1311,7 @@ struct __ecereNameSpace__ecere__sys__BinaryTree templateTypes; struct ClassDefinition * classDef; unsigned int templateTypesOnly; unsigned int hasNameSpace; -} __attribute__ ((gcc_struct)); +} ecere_gcc_struct; struct ClassDefinition { @@ -1323,7 +1326,7 @@ struct Location blockStart; struct Location nameLoc; int declMode; unsigned int deleteWatchable; -} __attribute__ ((gcc_struct)); +} ecere_gcc_struct; void __ecereMethod_External_CreateUniqueEdge(struct External * this, struct External * from, unsigned int soft); @@ -1336,7 +1339,7 @@ struct Enumerator * next; struct Location loc; struct Identifier * id; struct Expression * exp; -} __attribute__ ((gcc_struct)); +} ecere_gcc_struct; struct TemplateArgument; @@ -1351,11 +1354,11 @@ union { struct TemplateDatatype * dataType; int memberType; -} __attribute__ ((gcc_struct)) __anon1; +} ecere_gcc_struct __anon1; struct TemplateArgument * defaultArgument; const char * dataTypeString; struct Type * baseType; -} __attribute__ ((gcc_struct)); +} ecere_gcc_struct; struct TemplateArgument { @@ -1369,8 +1372,8 @@ union struct Expression * expression; struct Identifier * identifier; struct TemplateDatatype * templateDatatype; -} __attribute__ ((gcc_struct)) __anon1; -} __attribute__ ((gcc_struct)); +} ecere_gcc_struct __anon1; +} ecere_gcc_struct; struct ClassDef; @@ -1414,7 +1417,7 @@ struct TemplateDatatype * templateDatatype; struct DBTableEntry * dbtableEntry; struct DBIndexItem * dbindexItem; struct DBTableDef * dbtableDef; -} __attribute__ ((gcc_struct)) YYSTYPE; +} ecere_gcc_struct YYSTYPE; extern YYSTYPE yylval; @@ -1437,11 +1440,11 @@ struct { struct Identifier * id; struct Initializer * initializer; -} __attribute__ ((gcc_struct)) __anon1; -} __attribute__ ((gcc_struct)) __anon1; +} ecere_gcc_struct __anon1; +} ecere_gcc_struct __anon1; int memberAccess; void * object; -} __attribute__ ((gcc_struct)); +} ecere_gcc_struct; extern struct ClassDef * MkClassDefFunction(struct ClassFunction * function); @@ -1459,7 +1462,7 @@ struct __ecereNameSpace__ecere__sys__BinaryTree nameSpaces; struct __ecereNameSpace__ecere__sys__BinaryTree classes; struct __ecereNameSpace__ecere__sys__BinaryTree defines; struct __ecereNameSpace__ecere__sys__BinaryTree functions; -} __attribute__ ((gcc_struct)); +} ecere_gcc_struct; struct __ecereNameSpace__ecere__com__Class { @@ -1518,7 +1521,7 @@ struct __ecereNameSpace__ecere__sys__OldList templatized; int numParams; unsigned int isInstanceClass; unsigned int byValueSystemClass; -} __attribute__ ((gcc_struct)); +} ecere_gcc_struct; struct __ecereNameSpace__ecere__com__Application { @@ -1529,7 +1532,7 @@ unsigned int isGUIApp; struct __ecereNameSpace__ecere__sys__OldList allModules; char * parsedCommand; struct __ecereNameSpace__ecere__com__NameSpace systemNameSpace; -} __attribute__ ((gcc_struct)); +} ecere_gcc_struct; void GetNameSpaceString(struct __ecereNameSpace__ecere__com__NameSpace * ns, char * string) { @@ -2195,7 +2198,7 @@ int importType; int origImportType; struct __ecereNameSpace__ecere__com__NameSpace privateNameSpace; struct __ecereNameSpace__ecere__com__NameSpace publicNameSpace; -} __attribute__ ((gcc_struct)); +} ecere_gcc_struct; void __ecereDestructor_ClassPropertyValue(struct __ecereNameSpace__ecere__com__Instance * this) { diff --git a/compiler/bootstrap/libec/bootstrap/pass15.c b/compiler/bootstrap/libec/bootstrap/pass15.c index 6dbeb91..40e3d1b 100644 --- a/compiler/bootstrap/libec/bootstrap/pass15.c +++ b/compiler/bootstrap/libec/bootstrap/pass15.c @@ -38,11 +38,14 @@ typedef unsigned __int64 uint64; #if defined(_WIN32) # if defined(__GNUC__) || defined(__TINYC__) # define ecere_stdcall __attribute__((__stdcall__)) +# define ecere_gcc_struct __attribute__((gcc_struct)) # else # define ecere_stdcall __stdcall +# define ecere_gcc_struct # endif #else # define ecere_stdcall +# define ecere_gcc_struct #endif #include #include @@ -188,7 +191,7 @@ void * last; int count; unsigned int offset; unsigned int circ; -} __attribute__ ((gcc_struct)); +} ecere_gcc_struct; struct __ecereNameSpace__ecere__com__DataValue { @@ -205,8 +208,8 @@ float f; double d; long long i64; uint64 ui64; -} __attribute__ ((gcc_struct)) __anon1; -} __attribute__ ((gcc_struct)); +} ecere_gcc_struct __anon1; +} ecere_gcc_struct; struct __ecereNameSpace__ecere__com__SerialBuffer { @@ -214,7 +217,7 @@ unsigned char * _buffer; unsigned int count; unsigned int _size; unsigned int pos; -} __attribute__ ((gcc_struct)); +} ecere_gcc_struct; extern void * __ecereNameSpace__ecere__com__eSystem_New(unsigned int size); @@ -246,7 +249,7 @@ int line; int charPos; int pos; int included; -} __attribute__ ((gcc_struct)); +} ecere_gcc_struct; extern size_t strlen(const char * ); @@ -271,7 +274,7 @@ struct __ecereNameSpace__ecere__com__LinkList void * first; void * last; int count; -} __attribute__ ((gcc_struct)); +} ecere_gcc_struct; extern char * strchr(const char * , int); @@ -357,7 +360,7 @@ struct __ecereNameSpace__ecere__com__EnumClassData { struct __ecereNameSpace__ecere__sys__OldList values; long long largest; -} __attribute__ ((gcc_struct)); +} ecere_gcc_struct; extern struct __ecereNameSpace__ecere__sys__OldList * CopyList(struct __ecereNameSpace__ecere__sys__OldList * source, void * (* CopyFunction)(void * )); @@ -379,7 +382,7 @@ struct Location { struct CodePosition start; struct CodePosition end; -} __attribute__ ((gcc_struct)); +} ecere_gcc_struct; void ReadString(char * output, char * string) { @@ -617,8 +620,8 @@ union { char * s; struct Attrib * attr; -} __attribute__ ((gcc_struct)) __anon1; -} __attribute__ ((gcc_struct)); +} ecere_gcc_struct __anon1; +} ecere_gcc_struct; extern struct ExtDecl * MkExtDeclAttrib(struct Attrib * attr); @@ -697,7 +700,7 @@ struct __ecereNameSpace__ecere__com__Instance void * * _vTbl; struct __ecereNameSpace__ecere__com__Class * _class; int _refCount; -} __attribute__ ((gcc_struct)); +} ecere_gcc_struct; extern long long __ecereNameSpace__ecere__com__eClass_GetProperty(struct __ecereNameSpace__ecere__com__Class * _class, const char * name); @@ -768,7 +771,7 @@ struct __ecereNameSpace__ecere__sys__OldList classes; struct __ecereNameSpace__ecere__sys__OldList functions; int importType; int importAccess; -} __attribute__ ((gcc_struct)); +} ecere_gcc_struct; struct __ecereNameSpace__ecere__com__NameSpace; @@ -787,7 +790,7 @@ struct __ecereNameSpace__ecere__sys__BTNode * parent; struct __ecereNameSpace__ecere__sys__BTNode * left; struct __ecereNameSpace__ecere__sys__BTNode * right; int depth; -} __attribute__ ((gcc_struct)); +} ecere_gcc_struct; struct __ecereNameSpace__ecere__sys__BTNode * __ecereProp___ecereNameSpace__ecere__sys__BTNode_Get_next(struct __ecereNameSpace__ecere__sys__BTNode * this); @@ -817,7 +820,7 @@ const char * category; unsigned int compiled; unsigned int selfWatchable; unsigned int isWatchable; -} __attribute__ ((gcc_struct)); +} ecere_gcc_struct; extern void __ecereNameSpace__ecere__com__eInstance_FireSelfWatchers(struct __ecereNameSpace__ecere__com__Instance * instance, struct __ecereNameSpace__ecere__com__Property * _property); @@ -848,7 +851,7 @@ struct __ecereNameSpace__ecere__sys__OldLink struct __ecereNameSpace__ecere__sys__OldLink * prev; struct __ecereNameSpace__ecere__sys__OldLink * next; void * data; -} __attribute__ ((gcc_struct)); +} ecere_gcc_struct; struct Declaration; @@ -885,51 +888,51 @@ struct { struct Identifier * id; struct Statement * stmt; -} __attribute__ ((gcc_struct)) labeled; +} ecere_gcc_struct labeled; struct { struct Expression * exp; struct Statement * stmt; -} __attribute__ ((gcc_struct)) caseStmt; +} ecere_gcc_struct caseStmt; struct { struct __ecereNameSpace__ecere__sys__OldList * declarations; struct __ecereNameSpace__ecere__sys__OldList * statements; struct Context * context; unsigned int isSwitch; -} __attribute__ ((gcc_struct)) compound; +} ecere_gcc_struct compound; struct { struct __ecereNameSpace__ecere__sys__OldList * exp; struct Statement * stmt; struct Statement * elseStmt; -} __attribute__ ((gcc_struct)) ifStmt; +} ecere_gcc_struct ifStmt; struct { struct __ecereNameSpace__ecere__sys__OldList * exp; struct Statement * stmt; -} __attribute__ ((gcc_struct)) switchStmt; +} ecere_gcc_struct switchStmt; struct { struct __ecereNameSpace__ecere__sys__OldList * exp; struct Statement * stmt; -} __attribute__ ((gcc_struct)) whileStmt; +} ecere_gcc_struct whileStmt; struct { struct __ecereNameSpace__ecere__sys__OldList * exp; struct Statement * stmt; -} __attribute__ ((gcc_struct)) doWhile; +} ecere_gcc_struct doWhile; struct { struct Statement * init; struct Statement * check; struct __ecereNameSpace__ecere__sys__OldList * increment; struct Statement * stmt; -} __attribute__ ((gcc_struct)) forStmt; +} ecere_gcc_struct forStmt; struct { struct Identifier * id; -} __attribute__ ((gcc_struct)) gotoStmt; +} ecere_gcc_struct gotoStmt; struct { struct Specifier * spec; @@ -937,23 +940,23 @@ char * statements; struct __ecereNameSpace__ecere__sys__OldList * inputFields; struct __ecereNameSpace__ecere__sys__OldList * outputFields; struct __ecereNameSpace__ecere__sys__OldList * clobberedFields; -} __attribute__ ((gcc_struct)) asmStmt; +} ecere_gcc_struct asmStmt; struct { struct Expression * watcher; struct Expression * object; struct __ecereNameSpace__ecere__sys__OldList * watches; -} __attribute__ ((gcc_struct)) _watch; +} ecere_gcc_struct _watch; struct { struct Identifier * id; struct __ecereNameSpace__ecere__sys__OldList * exp; struct __ecereNameSpace__ecere__sys__OldList * filter; struct Statement * stmt; -} __attribute__ ((gcc_struct)) forEachStmt; +} ecere_gcc_struct forEachStmt; struct Declaration * decl; -} __attribute__ ((gcc_struct)) __anon1; -} __attribute__ ((gcc_struct)); +} ecere_gcc_struct __anon1; +} ecere_gcc_struct; extern struct Specifier * CopySpecifier(struct Specifier * spec); @@ -970,7 +973,7 @@ struct Symbol * classSym; struct Specifier * _class; char * string; struct Identifier * badID; -} __attribute__ ((gcc_struct)); +} ecere_gcc_struct; extern struct Symbol * FindStruct(struct Context * ctx, const char * name); @@ -996,7 +999,7 @@ struct TemplateDatatype { struct __ecereNameSpace__ecere__sys__OldList * specifiers; struct Declarator * decl; -} __attribute__ ((gcc_struct)); +} ecere_gcc_struct; extern struct Declarator * SpecDeclFromString(const char * string, struct __ecereNameSpace__ecere__sys__OldList * specs, struct Declarator * baseDecl); @@ -1024,26 +1027,26 @@ struct struct Expression * exp; struct Expression * posExp; struct Attrib * attrib; -} __attribute__ ((gcc_struct)) structDecl; +} ecere_gcc_struct structDecl; struct { struct Expression * exp; struct Specifier * enumClass; -} __attribute__ ((gcc_struct)) array; +} ecere_gcc_struct array; struct { struct __ecereNameSpace__ecere__sys__OldList * parameters; -} __attribute__ ((gcc_struct)) function; +} ecere_gcc_struct function; struct { struct Pointer * pointer; -} __attribute__ ((gcc_struct)) pointer; +} ecere_gcc_struct pointer; struct { struct ExtDecl * extended; -} __attribute__ ((gcc_struct)) extended; -} __attribute__ ((gcc_struct)) __anon1; -} __attribute__ ((gcc_struct)); +} ecere_gcc_struct extended; +} ecere_gcc_struct __anon1; +} ecere_gcc_struct; extern struct Identifier * GetDeclId(struct Declarator * decl); @@ -1077,7 +1080,7 @@ struct Type * type; struct Symbol * propSet; int tempCount; unsigned int propertyNoThis; -} __attribute__ ((gcc_struct)); +} ecere_gcc_struct; extern struct Declarator * QMkPtrDecl(const char * id); @@ -1103,7 +1106,7 @@ unsigned int isDestructor; unsigned int dontMangle; int id; int idCode; -} __attribute__ ((gcc_struct)); +} ecere_gcc_struct; extern struct External * ProcessClassFunction(struct __ecereNameSpace__ecere__com__Class * owningClass, struct ClassFunction * func, struct __ecereNameSpace__ecere__sys__OldList * defs, struct External * after, unsigned int makeStatic); @@ -1128,7 +1131,7 @@ struct __ecereNameSpace__ecere__sys__OldList * qualifiers; struct Declarator * declarator; int classObjectType; struct Expression * bitCount; -} __attribute__ ((gcc_struct)); +} ecere_gcc_struct; extern void FreeTypeName(struct TypeName * typeName); @@ -1150,7 +1153,7 @@ struct __ecereNameSpace__ecere__com__BTNamedLink * left; struct __ecereNameSpace__ecere__com__BTNamedLink * right; int depth; void * data; -} __attribute__ ((gcc_struct)); +} ecere_gcc_struct; struct __ecereNameSpace__ecere__sys__NamedLink64; @@ -1160,7 +1163,7 @@ struct __ecereNameSpace__ecere__sys__NamedLink64 * prev; struct __ecereNameSpace__ecere__sys__NamedLink64 * next; char * name; long long data; -} __attribute__ ((gcc_struct)); +} ecere_gcc_struct; struct Instantiation; @@ -1176,18 +1179,18 @@ struct { struct __ecereNameSpace__ecere__sys__OldList * specifiers; struct __ecereNameSpace__ecere__sys__OldList * declarators; -} __attribute__ ((gcc_struct)) __anon1; +} ecere_gcc_struct __anon1; struct Instantiation * inst; struct { struct Identifier * id; struct Expression * exp; -} __attribute__ ((gcc_struct)) __anon2; -} __attribute__ ((gcc_struct)) __anon1; +} ecere_gcc_struct __anon2; +} ecere_gcc_struct __anon1; struct Specifier * extStorage; struct Symbol * symbol; int declMode; -} __attribute__ ((gcc_struct)); +} ecere_gcc_struct; struct Instantiation { @@ -1204,7 +1207,7 @@ unsigned char * data; struct Location nameLoc; struct Location insideLoc; unsigned int built; -} __attribute__ ((gcc_struct)); +} ecere_gcc_struct; extern void FreeInstance(struct Instantiation * inst); @@ -1226,7 +1229,7 @@ struct Location loc; struct Statement * compound; struct __ecereNameSpace__ecere__sys__OldList * properties; unsigned int deleteWatch; -} __attribute__ ((gcc_struct)); +} ecere_gcc_struct; extern void FreePropertyWatch(struct PropertyWatch * watcher); @@ -1240,7 +1243,7 @@ char * name; unsigned int isVirtual; unsigned int hasSet; unsigned int hasGet; -} __attribute__ ((gcc_struct)); +} ecere_gcc_struct; struct MethodImport; @@ -1250,7 +1253,7 @@ struct MethodImport * prev; struct MethodImport * next; char * name; unsigned int isVirtual; -} __attribute__ ((gcc_struct)); +} ecere_gcc_struct; struct FunctionImport; @@ -1259,7 +1262,7 @@ struct FunctionImport struct FunctionImport * prev; struct FunctionImport * next; char * name; -} __attribute__ ((gcc_struct)); +} ecere_gcc_struct; struct ClassImport; @@ -1272,7 +1275,7 @@ struct __ecereNameSpace__ecere__sys__OldList methods; struct __ecereNameSpace__ecere__sys__OldList properties; unsigned int itself; int isRemote; -} __attribute__ ((gcc_struct)); +} ecere_gcc_struct; struct Initializer; @@ -1288,7 +1291,7 @@ struct { char * constant; struct Identifier * identifier; -} __attribute__ ((gcc_struct)) __anon1; +} ecere_gcc_struct __anon1; struct Statement * compound; struct Instantiation * instance; struct @@ -1296,86 +1299,86 @@ struct char * string; unsigned int intlString; unsigned int wideString; -} __attribute__ ((gcc_struct)) __anon2; +} ecere_gcc_struct __anon2; struct __ecereNameSpace__ecere__sys__OldList * list; struct { struct __ecereNameSpace__ecere__sys__OldList * specifiers; struct Declarator * decl; -} __attribute__ ((gcc_struct)) _classExp; +} ecere_gcc_struct _classExp; struct { struct Identifier * id; -} __attribute__ ((gcc_struct)) classData; +} ecere_gcc_struct classData; struct { struct Expression * exp; struct __ecereNameSpace__ecere__sys__OldList * arguments; struct Location argLoc; -} __attribute__ ((gcc_struct)) call; +} ecere_gcc_struct call; struct { struct Expression * exp; struct __ecereNameSpace__ecere__sys__OldList * index; -} __attribute__ ((gcc_struct)) index; +} ecere_gcc_struct index; struct { struct Expression * exp; struct Identifier * member; int memberType; unsigned int thisPtr; -} __attribute__ ((gcc_struct)) member; +} ecere_gcc_struct member; struct { int op; struct Expression * exp1; struct Expression * exp2; -} __attribute__ ((gcc_struct)) op; +} ecere_gcc_struct op; struct TypeName * typeName; struct Specifier * _class; struct { struct TypeName * typeName; struct Expression * exp; -} __attribute__ ((gcc_struct)) cast; +} ecere_gcc_struct cast; struct { struct Expression * cond; struct __ecereNameSpace__ecere__sys__OldList * exp; struct Expression * elseExp; -} __attribute__ ((gcc_struct)) cond; +} ecere_gcc_struct cond; struct { struct TypeName * typeName; struct Expression * size; -} __attribute__ ((gcc_struct)) _new; +} ecere_gcc_struct _new; struct { struct TypeName * typeName; struct Expression * size; struct Expression * exp; -} __attribute__ ((gcc_struct)) _renew; +} ecere_gcc_struct _renew; struct { char * table; struct Identifier * id; -} __attribute__ ((gcc_struct)) db; +} ecere_gcc_struct db; struct { struct Expression * ds; struct Expression * name; -} __attribute__ ((gcc_struct)) dbopen; +} ecere_gcc_struct dbopen; struct { struct TypeName * typeName; struct Initializer * initializer; -} __attribute__ ((gcc_struct)) initializer; +} ecere_gcc_struct initializer; struct { struct Expression * exp; struct TypeName * typeName; -} __attribute__ ((gcc_struct)) vaArg; -} __attribute__ ((gcc_struct)) __anon1; +} ecere_gcc_struct vaArg; +} ecere_gcc_struct __anon1; unsigned int debugValue; struct __ecereNameSpace__ecere__com__DataValue val; uint64 address; @@ -1391,7 +1394,7 @@ unsigned int needCast; unsigned int thisPtr; unsigned int opDestType; unsigned int needTemplateCast; -} __attribute__ ((gcc_struct)); +} ecere_gcc_struct; extern struct InitDeclarator * MkInitDeclarator(struct Declarator * declarator, struct Initializer * initializer); @@ -1405,10 +1408,10 @@ union { struct Expression * exp; struct __ecereNameSpace__ecere__sys__OldList * list; -} __attribute__ ((gcc_struct)) __anon1; +} ecere_gcc_struct __anon1; unsigned int isConstant; struct Identifier * id; -} __attribute__ ((gcc_struct)); +} ecere_gcc_struct; extern struct Initializer * MkInitializerAssignment(struct Expression * exp); @@ -1423,7 +1426,7 @@ struct InitDeclarator * next; struct Location loc; struct Declarator * declarator; struct Initializer * initializer; -} __attribute__ ((gcc_struct)); +} ecere_gcc_struct; void ApplyLocation(struct Expression * exp, struct Location * loc) { @@ -1512,8 +1515,8 @@ union { struct __ecereNameSpace__ecere__sys__OldList * dataMembers; struct ClassFunction * function; -} __attribute__ ((gcc_struct)) __anon1; -} __attribute__ ((gcc_struct)); +} ecere_gcc_struct __anon1; +} ecere_gcc_struct; extern struct MembersInit * MkMembersInitList(struct __ecereNameSpace__ecere__sys__OldList * dataMembers); @@ -1556,7 +1559,7 @@ unsigned int (* Sma)(struct Expression *, struct Operand *, struct Operand *); unsigned int (* GrtEqu)(struct Expression *, struct Operand *, struct Operand *); unsigned int (* SmaEqu)(struct Expression *, struct Operand *, struct Operand *); unsigned int (* Cond)(struct Expression *, struct Operand *, struct Operand *, struct Operand *); -} __attribute__ ((gcc_struct)); +} ecere_gcc_struct; struct Operand { @@ -1575,9 +1578,9 @@ float f; double d; long long i64; uint64 ui64; -} __attribute__ ((gcc_struct)) __anon1; +} ecere_gcc_struct __anon1; struct OpTable ops; -} __attribute__ ((gcc_struct)); +} ecere_gcc_struct; struct External * _DeclareStruct(struct External * neededBy, const char * name, unsigned int skipNoHead, unsigned int needDereference, unsigned int fwdDecl); @@ -1627,7 +1630,7 @@ void * symbol; const char * dataTypeString; struct Type * dataType; int memberAccess; -} __attribute__ ((gcc_struct)); +} ecere_gcc_struct; struct Symbol { @@ -1642,7 +1645,7 @@ union struct __ecereNameSpace__ecere__com__Method * method; struct __ecereNameSpace__ecere__com__Property * _property; struct __ecereNameSpace__ecere__com__Class * registered; -} __attribute__ ((gcc_struct)) __anon1; +} ecere_gcc_struct __anon1; unsigned int notYetDeclared; union { @@ -1650,20 +1653,20 @@ struct { struct External * pointerExternal; struct External * structExternal; -} __attribute__ ((gcc_struct)) __anon1; +} ecere_gcc_struct __anon1; struct { struct External * externalGet; struct External * externalSet; struct External * externalPtr; struct External * externalIsSet; -} __attribute__ ((gcc_struct)) __anon2; +} ecere_gcc_struct __anon2; struct { struct External * methodExternal; struct External * methodCodeExternal; -} __attribute__ ((gcc_struct)) __anon3; -} __attribute__ ((gcc_struct)) __anon2; +} ecere_gcc_struct __anon3; +} ecere_gcc_struct __anon2; unsigned int imported; unsigned int declaredStructSym; struct __ecereNameSpace__ecere__com__Class * _class; @@ -1691,7 +1694,7 @@ struct Context * ctx; int isIterator; struct Expression * propCategory; unsigned int mustRegister; -} __attribute__ ((gcc_struct)); +} ecere_gcc_struct; struct __ecereNameSpace__ecere__com__ClassProperty; @@ -1709,7 +1712,7 @@ long long (* Get)(struct __ecereNameSpace__ecere__com__Class *); const char * dataTypeString; struct Type * dataType; unsigned int constant; -} __attribute__ ((gcc_struct)); +} ecere_gcc_struct; struct __ecereNameSpace__ecere__com__BitMember; @@ -1729,7 +1732,7 @@ int type; int size; int pos; uint64 mask; -} __attribute__ ((gcc_struct)); +} ecere_gcc_struct; struct __ecereNameSpace__ecere__com__DataMember; @@ -1741,7 +1744,7 @@ struct { const char * dataTypeString; struct __ecereNameSpace__ecere__com__Class * dataTypeClass; -} __attribute__ ((gcc_struct)) __anon1; +} ecere_gcc_struct __anon1; struct __ecereNameSpace__ecere__com__DataValue expression; struct { @@ -1751,10 +1754,10 @@ union struct __ecereNameSpace__ecere__com__DataMember * member; struct __ecereNameSpace__ecere__com__Property * prop; struct __ecereNameSpace__ecere__com__Method * method; -} __attribute__ ((gcc_struct)) __anon1; -} __attribute__ ((gcc_struct)) __anon2; -} __attribute__ ((gcc_struct)) __anon1; -} __attribute__ ((gcc_struct)); +} ecere_gcc_struct __anon1; +} ecere_gcc_struct __anon2; +} ecere_gcc_struct __anon1; +} ecere_gcc_struct; extern void __ecereNameSpace__ecere__com__eClass_FindNextMember(struct __ecereNameSpace__ecere__com__Class * _class, struct __ecereNameSpace__ecere__com__Class ** curClass, struct __ecereNameSpace__ecere__com__DataMember ** curMember, struct __ecereNameSpace__ecere__com__DataMember ** subMemberStack, int * subMemberStackPos); @@ -1773,11 +1776,11 @@ union { struct TemplateDatatype * dataType; int memberType; -} __attribute__ ((gcc_struct)) __anon1; +} ecere_gcc_struct __anon1; struct TemplateArgument * defaultArgument; const char * dataTypeString; struct Type * baseType; -} __attribute__ ((gcc_struct)); +} ecere_gcc_struct; struct Type { @@ -1791,7 +1794,7 @@ struct { struct __ecereNameSpace__ecere__sys__OldList members; char * enumName; -} __attribute__ ((gcc_struct)) __anon1; +} ecere_gcc_struct __anon1; struct { struct Type * returnType; @@ -1799,13 +1802,13 @@ struct __ecereNameSpace__ecere__sys__OldList params; struct Symbol * thisClass; unsigned int staticMethod; struct TemplateParameter * thisClassTemplate; -} __attribute__ ((gcc_struct)) __anon2; +} ecere_gcc_struct __anon2; struct { struct __ecereNameSpace__ecere__com__Method * method; struct __ecereNameSpace__ecere__com__Class * methodClass; struct __ecereNameSpace__ecere__com__Class * usedClass; -} __attribute__ ((gcc_struct)) __anon3; +} ecere_gcc_struct __anon3; struct { struct Type * arrayType; @@ -1813,10 +1816,10 @@ int arraySize; struct Expression * arraySizeExp; unsigned int freeExp; struct Symbol * enumClass; -} __attribute__ ((gcc_struct)) __anon4; +} ecere_gcc_struct __anon4; struct Type * type; struct TemplateParameter * templateParameter; -} __attribute__ ((gcc_struct)) __anon1; +} ecere_gcc_struct __anon1; int kind; unsigned int size; char * name; @@ -1843,7 +1846,7 @@ unsigned int typedByReference : 1; unsigned int casted : 1; unsigned int pointerAlignment : 1; unsigned int isLong : 1; -} __attribute__ ((gcc_struct)); +} ecere_gcc_struct; struct Specifier { @@ -1861,7 +1864,7 @@ char * name; struct Symbol * symbol; struct __ecereNameSpace__ecere__sys__OldList * templateArgs; struct Specifier * nsSpec; -} __attribute__ ((gcc_struct)) __anon1; +} ecere_gcc_struct __anon1; struct { struct Identifier * id; @@ -1871,12 +1874,12 @@ struct __ecereNameSpace__ecere__sys__OldList * definitions; unsigned int addNameSpace; struct Context * ctx; struct ExtDecl * extDeclStruct; -} __attribute__ ((gcc_struct)) __anon2; +} ecere_gcc_struct __anon2; struct Expression * expression; struct Specifier * _class; struct TemplateParameter * templateParameter; -} __attribute__ ((gcc_struct)) __anon1; -} __attribute__ ((gcc_struct)); +} ecere_gcc_struct __anon1; +} ecere_gcc_struct; extern struct Expression * GetTemplateArgExp(struct TemplateParameter * param, struct __ecereNameSpace__ecere__com__Class * curClass, unsigned int pointer); @@ -1888,7 +1891,7 @@ struct __ecereNameSpace__ecere__sys__BTNode * left; struct __ecereNameSpace__ecere__sys__BTNode * right; int depth; struct TemplateParameter * param; -} __attribute__ ((gcc_struct)); +} ecere_gcc_struct; struct Type * ProcessTemplateParameterType(struct TemplateParameter * param) { @@ -7350,7 +7353,7 @@ char * dataTypeString; struct Type * dataType; void * symbol; char * fullName; -} __attribute__ ((gcc_struct)); +} ecere_gcc_struct; extern struct __ecereNameSpace__ecere__com__DataMember * __ecereNameSpace__ecere__com__eClass_FindDataMemberAndOffset(struct __ecereNameSpace__ecere__com__Class * _class, const char * name, unsigned int * offset, struct __ecereNameSpace__ecere__com__Instance * module, struct __ecereNameSpace__ecere__com__DataMember ** subMemberStack, int * subMemberStackPos); @@ -7371,7 +7374,7 @@ struct __ecereNameSpace__ecere__com__DefinedExpression * next; const char * name; const char * value; struct __ecereNameSpace__ecere__com__NameSpace * nameSpace; -} __attribute__ ((gcc_struct)); +} ecere_gcc_struct; struct __ecereNameSpace__ecere__sys__BinaryTree; @@ -7381,7 +7384,7 @@ struct __ecereNameSpace__ecere__sys__BTNode * root; int count; int (* CompareKey)(struct __ecereNameSpace__ecere__sys__BinaryTree * tree, uintptr_t a, uintptr_t b); void (* FreeKey)(void * key); -} __attribute__ ((gcc_struct)); +} ecere_gcc_struct; struct __ecereNameSpace__ecere__com__Class { @@ -7440,7 +7443,7 @@ struct __ecereNameSpace__ecere__sys__OldList templatized; int numParams; unsigned int isInstanceClass; unsigned int byValueSystemClass; -} __attribute__ ((gcc_struct)); +} ecere_gcc_struct; struct __ecereNameSpace__ecere__com__NameSpace { @@ -7454,7 +7457,7 @@ struct __ecereNameSpace__ecere__sys__BinaryTree nameSpaces; struct __ecereNameSpace__ecere__sys__BinaryTree classes; struct __ecereNameSpace__ecere__sys__BinaryTree defines; struct __ecereNameSpace__ecere__sys__BinaryTree functions; -} __attribute__ ((gcc_struct)); +} ecere_gcc_struct; struct __ecereNameSpace__ecere__com__DataMember { @@ -7476,7 +7479,7 @@ struct __ecereNameSpace__ecere__sys__BinaryTree membersAlpha; int memberOffset; short structAlignment; short pointerAlignment; -} __attribute__ ((gcc_struct)); +} ecere_gcc_struct; struct __ecereNameSpace__ecere__sys__BTNode * __ecereMethod___ecereNameSpace__ecere__sys__BinaryTree_FindString(struct __ecereNameSpace__ecere__sys__BinaryTree * this, const char * key); @@ -7965,7 +7968,7 @@ unsigned int isGUIApp; struct __ecereNameSpace__ecere__sys__OldList allModules; char * parsedCommand; struct __ecereNameSpace__ecere__com__NameSpace systemNameSpace; -} __attribute__ ((gcc_struct)); +} ecere_gcc_struct; static void FindNextDataMember(struct __ecereNameSpace__ecere__com__Class * _class, struct __ecereNameSpace__ecere__com__Class ** curClass, struct __ecereNameSpace__ecere__com__DataMember ** curMember, struct __ecereNameSpace__ecere__com__DataMember ** subMemberStack, int * subMemberStackPos) { @@ -8338,7 +8341,7 @@ int importType; int origImportType; struct __ecereNameSpace__ecere__com__NameSpace privateNameSpace; struct __ecereNameSpace__ecere__com__NameSpace publicNameSpace; -} __attribute__ ((gcc_struct)); +} ecere_gcc_struct; static struct GlobalData * FindGlobalData(char * name) { @@ -8513,7 +8516,7 @@ struct Conversion * prev, * next; struct __ecereNameSpace__ecere__com__Property * convert; unsigned int isGet; struct Type * resultType; -} __attribute__ ((gcc_struct)); +} ecere_gcc_struct; static void FreeConvert(struct Conversion * convert) { @@ -8530,7 +8533,7 @@ struct Enumerator * next; struct Location loc; struct Identifier * id; struct Expression * exp; -} __attribute__ ((gcc_struct)); +} ecere_gcc_struct; struct AsmField; @@ -8542,7 +8545,7 @@ struct Location loc; char * command; struct Expression * expression; struct Identifier * symbolic; -} __attribute__ ((gcc_struct)); +} ecere_gcc_struct; struct ClassDefinition; @@ -8559,7 +8562,7 @@ struct __ecereNameSpace__ecere__sys__BinaryTree templateTypes; struct ClassDefinition * classDef; unsigned int templateTypesOnly; unsigned int hasNameSpace; -} __attribute__ ((gcc_struct)); +} ecere_gcc_struct; struct External { @@ -8576,13 +8579,13 @@ struct Declaration * declaration; char * importString; struct Identifier * id; struct DBTableDef * table; -} __attribute__ ((gcc_struct)) __anon1; +} ecere_gcc_struct __anon1; int importType; struct External * fwdDecl; struct __ecereNameSpace__ecere__com__Instance * outgoing; struct __ecereNameSpace__ecere__com__Instance * incoming; int nonBreakableIncoming; -} __attribute__ ((gcc_struct)); +} ecere_gcc_struct; struct ClassDefinition { @@ -8597,7 +8600,7 @@ struct Location blockStart; struct Location nameLoc; int declMode; unsigned int deleteWatchable; -} __attribute__ ((gcc_struct)); +} ecere_gcc_struct; void __ecereMethod_External_CreateUniqueEdge(struct External * this, struct External * from, unsigned int soft); @@ -8695,11 +8698,11 @@ struct { struct Identifier * id; struct Initializer * initializer; -} __attribute__ ((gcc_struct)) __anon1; -} __attribute__ ((gcc_struct)) __anon1; +} ecere_gcc_struct __anon1; +} ecere_gcc_struct __anon1; int memberAccess; void * object; -} __attribute__ ((gcc_struct)); +} ecere_gcc_struct; struct PropertyDef { @@ -8719,8 +8722,8 @@ struct unsigned int conversion : 1; unsigned int isWatchable : 1; unsigned int isDBProp : 1; -} __attribute__ ((gcc_struct)) __anon1; -} __attribute__ ((gcc_struct)); +} ecere_gcc_struct __anon1; +} ecere_gcc_struct; static void IdentifyAnonStructs(struct __ecereNameSpace__ecere__sys__OldList * definitions) { @@ -8818,7 +8821,7 @@ struct TemplateDatatype * templateDatatype; struct DBTableEntry * dbtableEntry; struct DBIndexItem * dbindexItem; struct DBTableDef * dbtableDef; -} __attribute__ ((gcc_struct)) YYSTYPE; +} ecere_gcc_struct YYSTYPE; extern YYSTYPE yylval; @@ -8833,7 +8836,7 @@ struct Initializer * initializer; unsigned int used; unsigned int variable; unsigned int takeOutExp; -} __attribute__ ((gcc_struct)); +} ecere_gcc_struct; extern struct MemberInit * MkMemberInit(struct __ecereNameSpace__ecere__sys__OldList * ids, struct Initializer * initializer); @@ -8849,10 +8852,10 @@ union { const char * dataTypeString; int memberType; -} __attribute__ ((gcc_struct)) __anon1; +} ecere_gcc_struct __anon1; struct __ecereNameSpace__ecere__com__ClassTemplateArgument defaultArg; void * param; -} __attribute__ ((gcc_struct)); +} ecere_gcc_struct; struct __ecereNameSpace__ecere__com__ClassTemplateArgument * FindTemplateArg(struct __ecereNameSpace__ecere__com__Class * _class, struct TemplateParameter * param) { @@ -9649,7 +9652,7 @@ struct __ecereNameSpace__ecere__com__NameSpace * nameSpace; const char * dataTypeString; struct Type * dataType; void * symbol; -} __attribute__ ((gcc_struct)); +} ecere_gcc_struct; extern struct __ecereNameSpace__ecere__com__GlobalFunction * __ecereNameSpace__ecere__com__eSystem_FindFunction(struct __ecereNameSpace__ecere__com__Instance * module, const char * name); @@ -9822,7 +9825,7 @@ struct __ecereNameSpace__ecere__com__SubModule * prev; struct __ecereNameSpace__ecere__com__SubModule * next; struct __ecereNameSpace__ecere__com__Instance * module; int importMode; -} __attribute__ ((gcc_struct)); +} ecere_gcc_struct; unsigned int ModuleVisibility(struct __ecereNameSpace__ecere__com__Instance * searchIn, struct __ecereNameSpace__ecere__com__Instance * searchFor) { diff --git a/compiler/bootstrap/libec/bootstrap/pass16.c b/compiler/bootstrap/libec/bootstrap/pass16.c index f428ea7..435fdd0 100644 --- a/compiler/bootstrap/libec/bootstrap/pass16.c +++ b/compiler/bootstrap/libec/bootstrap/pass16.c @@ -38,11 +38,14 @@ typedef unsigned __int64 uint64; #if defined(_WIN32) # if defined(__GNUC__) || defined(__TINYC__) # define ecere_stdcall __attribute__((__stdcall__)) +# define ecere_gcc_struct __attribute__((gcc_struct)) # else # define ecere_stdcall __stdcall +# define ecere_gcc_struct # endif #else # define ecere_stdcall +# define ecere_gcc_struct #endif #include #include @@ -64,7 +67,7 @@ void * last; int count; unsigned int offset; unsigned int circ; -} __attribute__ ((gcc_struct)); +} ecere_gcc_struct; struct __ecereNameSpace__ecere__sys__BTNode; @@ -83,8 +86,8 @@ float f; double d; long long i64; uint64 ui64; -} __attribute__ ((gcc_struct)) __anon1; -} __attribute__ ((gcc_struct)); +} ecere_gcc_struct __anon1; +} ecere_gcc_struct; struct __ecereNameSpace__ecere__com__SerialBuffer { @@ -92,7 +95,7 @@ unsigned char * _buffer; unsigned int count; unsigned int _size; unsigned int pos; -} __attribute__ ((gcc_struct)); +} ecere_gcc_struct; extern void * __ecereNameSpace__ecere__com__eSystem_New(unsigned int size); @@ -132,7 +135,7 @@ int line; int charPos; int pos; int included; -} __attribute__ ((gcc_struct)); +} ecere_gcc_struct; extern char * __ecereNameSpace__ecere__sys__GetLastDirectory(const char * string, char * output); @@ -155,7 +158,7 @@ struct __ecereNameSpace__ecere__com__LinkList void * first; void * last; int count; -} __attribute__ ((gcc_struct)); +} ecere_gcc_struct; extern int strcmp(const char * , const char * ); @@ -167,7 +170,7 @@ struct __ecereNameSpace__ecere__com__LinkElement { void * prev; void * next; -} __attribute__ ((gcc_struct)); +} ecere_gcc_struct; struct __ecereNameSpace__ecere__com__GlobalFunction; @@ -201,7 +204,7 @@ struct Location { struct CodePosition start; struct CodePosition end; -} __attribute__ ((gcc_struct)); +} ecere_gcc_struct; extern struct Location yylloc; @@ -222,7 +225,7 @@ struct __ecereNameSpace__ecere__com__LinkElement out; struct External * from; struct External * to; unsigned int breakable; -} __attribute__ ((gcc_struct)); +} ecere_gcc_struct; struct Statement; @@ -259,7 +262,7 @@ struct __ecereNameSpace__ecere__sys__OldList classes; struct __ecereNameSpace__ecere__sys__OldList functions; int importType; int importAccess; -} __attribute__ ((gcc_struct)); +} ecere_gcc_struct; struct Expression; @@ -305,7 +308,7 @@ struct __ecereNameSpace__ecere__com__Instance void * * _vTbl; struct __ecereNameSpace__ecere__com__Class * _class; int _refCount; -} __attribute__ ((gcc_struct)); +} ecere_gcc_struct; extern long long __ecereNameSpace__ecere__com__eClass_GetProperty(struct __ecereNameSpace__ecere__com__Class * _class, const char * name); @@ -362,51 +365,51 @@ struct { struct Identifier * id; struct Statement * stmt; -} __attribute__ ((gcc_struct)) labeled; +} ecere_gcc_struct labeled; struct { struct Expression * exp; struct Statement * stmt; -} __attribute__ ((gcc_struct)) caseStmt; +} ecere_gcc_struct caseStmt; struct { struct __ecereNameSpace__ecere__sys__OldList * declarations; struct __ecereNameSpace__ecere__sys__OldList * statements; struct Context * context; unsigned int isSwitch; -} __attribute__ ((gcc_struct)) compound; +} ecere_gcc_struct compound; struct { struct __ecereNameSpace__ecere__sys__OldList * exp; struct Statement * stmt; struct Statement * elseStmt; -} __attribute__ ((gcc_struct)) ifStmt; +} ecere_gcc_struct ifStmt; struct { struct __ecereNameSpace__ecere__sys__OldList * exp; struct Statement * stmt; -} __attribute__ ((gcc_struct)) switchStmt; +} ecere_gcc_struct switchStmt; struct { struct __ecereNameSpace__ecere__sys__OldList * exp; struct Statement * stmt; -} __attribute__ ((gcc_struct)) whileStmt; +} ecere_gcc_struct whileStmt; struct { struct __ecereNameSpace__ecere__sys__OldList * exp; struct Statement * stmt; -} __attribute__ ((gcc_struct)) doWhile; +} ecere_gcc_struct doWhile; struct { struct Statement * init; struct Statement * check; struct __ecereNameSpace__ecere__sys__OldList * increment; struct Statement * stmt; -} __attribute__ ((gcc_struct)) forStmt; +} ecere_gcc_struct forStmt; struct { struct Identifier * id; -} __attribute__ ((gcc_struct)) gotoStmt; +} ecere_gcc_struct gotoStmt; struct { struct Specifier * spec; @@ -414,23 +417,23 @@ char * statements; struct __ecereNameSpace__ecere__sys__OldList * inputFields; struct __ecereNameSpace__ecere__sys__OldList * outputFields; struct __ecereNameSpace__ecere__sys__OldList * clobberedFields; -} __attribute__ ((gcc_struct)) asmStmt; +} ecere_gcc_struct asmStmt; struct { struct Expression * watcher; struct Expression * object; struct __ecereNameSpace__ecere__sys__OldList * watches; -} __attribute__ ((gcc_struct)) _watch; +} ecere_gcc_struct _watch; struct { struct Identifier * id; struct __ecereNameSpace__ecere__sys__OldList * exp; struct __ecereNameSpace__ecere__sys__OldList * filter; struct Statement * stmt; -} __attribute__ ((gcc_struct)) forEachStmt; +} ecere_gcc_struct forEachStmt; struct Declaration * decl; -} __attribute__ ((gcc_struct)) __anon1; -} __attribute__ ((gcc_struct)); +} ecere_gcc_struct __anon1; +} ecere_gcc_struct; extern struct Identifier * MkIdentifier(const char * string); @@ -470,7 +473,7 @@ const char * category; unsigned int compiled; unsigned int selfWatchable; unsigned int isWatchable; -} __attribute__ ((gcc_struct)); +} ecere_gcc_struct; extern void FreeType(struct Type * type); @@ -492,10 +495,10 @@ union { struct Expression * exp; struct __ecereNameSpace__ecere__sys__OldList * list; -} __attribute__ ((gcc_struct)) __anon1; +} ecere_gcc_struct __anon1; unsigned int isConstant; struct Identifier * id; -} __attribute__ ((gcc_struct)); +} ecere_gcc_struct; extern void FreeInitializer(struct Initializer * initializer); @@ -521,7 +524,7 @@ char * name; struct Symbol * symbol; struct __ecereNameSpace__ecere__sys__OldList * templateArgs; struct Specifier * nsSpec; -} __attribute__ ((gcc_struct)) __anon1; +} ecere_gcc_struct __anon1; struct { struct Identifier * id; @@ -531,12 +534,12 @@ struct __ecereNameSpace__ecere__sys__OldList * definitions; unsigned int addNameSpace; struct Context * ctx; struct ExtDecl * extDeclStruct; -} __attribute__ ((gcc_struct)) __anon2; +} ecere_gcc_struct __anon2; struct Expression * expression; struct Specifier * _class; struct TemplateParameter * templateParameter; -} __attribute__ ((gcc_struct)) __anon1; -} __attribute__ ((gcc_struct)); +} ecere_gcc_struct __anon1; +} ecere_gcc_struct; struct Identifier { @@ -547,7 +550,7 @@ struct Symbol * classSym; struct Specifier * _class; char * string; struct Identifier * badID; -} __attribute__ ((gcc_struct)); +} ecere_gcc_struct; extern struct Symbol * FindClass(const char * name); @@ -574,7 +577,7 @@ unsigned char * data; struct Location nameLoc; struct Location insideLoc; unsigned int built; -} __attribute__ ((gcc_struct)); +} ecere_gcc_struct; struct Declaration { @@ -588,18 +591,18 @@ struct { struct __ecereNameSpace__ecere__sys__OldList * specifiers; struct __ecereNameSpace__ecere__sys__OldList * declarators; -} __attribute__ ((gcc_struct)) __anon1; +} ecere_gcc_struct __anon1; struct Instantiation * inst; struct { struct Identifier * id; struct Expression * exp; -} __attribute__ ((gcc_struct)) __anon2; -} __attribute__ ((gcc_struct)) __anon1; +} ecere_gcc_struct __anon2; +} ecere_gcc_struct __anon1; struct Specifier * extStorage; struct Symbol * symbol; int declMode; -} __attribute__ ((gcc_struct)); +} ecere_gcc_struct; extern struct Declaration * MkDeclarationInst(struct Instantiation * inst); @@ -626,7 +629,7 @@ void * symbol; const char * dataTypeString; struct Type * dataType; int memberAccess; -} __attribute__ ((gcc_struct)); +} ecere_gcc_struct; struct Type { @@ -640,7 +643,7 @@ struct { struct __ecereNameSpace__ecere__sys__OldList members; char * enumName; -} __attribute__ ((gcc_struct)) __anon1; +} ecere_gcc_struct __anon1; struct { struct Type * returnType; @@ -648,13 +651,13 @@ struct __ecereNameSpace__ecere__sys__OldList params; struct Symbol * thisClass; unsigned int staticMethod; struct TemplateParameter * thisClassTemplate; -} __attribute__ ((gcc_struct)) __anon2; +} ecere_gcc_struct __anon2; struct { struct __ecereNameSpace__ecere__com__Method * method; struct __ecereNameSpace__ecere__com__Class * methodClass; struct __ecereNameSpace__ecere__com__Class * usedClass; -} __attribute__ ((gcc_struct)) __anon3; +} ecere_gcc_struct __anon3; struct { struct Type * arrayType; @@ -662,10 +665,10 @@ int arraySize; struct Expression * arraySizeExp; unsigned int freeExp; struct Symbol * enumClass; -} __attribute__ ((gcc_struct)) __anon4; +} ecere_gcc_struct __anon4; struct Type * type; struct TemplateParameter * templateParameter; -} __attribute__ ((gcc_struct)) __anon1; +} ecere_gcc_struct __anon1; int kind; unsigned int size; char * name; @@ -692,7 +695,7 @@ unsigned int typedByReference : 1; unsigned int casted : 1; unsigned int pointerAlignment : 1; unsigned int isLong : 1; -} __attribute__ ((gcc_struct)); +} ecere_gcc_struct; extern void ProcessMethodType(struct __ecereNameSpace__ecere__com__Method * method); @@ -714,7 +717,7 @@ struct { char * constant; struct Identifier * identifier; -} __attribute__ ((gcc_struct)) __anon1; +} ecere_gcc_struct __anon1; struct Statement * compound; struct Instantiation * instance; struct @@ -722,86 +725,86 @@ struct char * string; unsigned int intlString; unsigned int wideString; -} __attribute__ ((gcc_struct)) __anon2; +} ecere_gcc_struct __anon2; struct __ecereNameSpace__ecere__sys__OldList * list; struct { struct __ecereNameSpace__ecere__sys__OldList * specifiers; struct Declarator * decl; -} __attribute__ ((gcc_struct)) _classExp; +} ecere_gcc_struct _classExp; struct { struct Identifier * id; -} __attribute__ ((gcc_struct)) classData; +} ecere_gcc_struct classData; struct { struct Expression * exp; struct __ecereNameSpace__ecere__sys__OldList * arguments; struct Location argLoc; -} __attribute__ ((gcc_struct)) call; +} ecere_gcc_struct call; struct { struct Expression * exp; struct __ecereNameSpace__ecere__sys__OldList * index; -} __attribute__ ((gcc_struct)) index; +} ecere_gcc_struct index; struct { struct Expression * exp; struct Identifier * member; int memberType; unsigned int thisPtr; -} __attribute__ ((gcc_struct)) member; +} ecere_gcc_struct member; struct { int op; struct Expression * exp1; struct Expression * exp2; -} __attribute__ ((gcc_struct)) op; +} ecere_gcc_struct op; struct TypeName * typeName; struct Specifier * _class; struct { struct TypeName * typeName; struct Expression * exp; -} __attribute__ ((gcc_struct)) cast; +} ecere_gcc_struct cast; struct { struct Expression * cond; struct __ecereNameSpace__ecere__sys__OldList * exp; struct Expression * elseExp; -} __attribute__ ((gcc_struct)) cond; +} ecere_gcc_struct cond; struct { struct TypeName * typeName; struct Expression * size; -} __attribute__ ((gcc_struct)) _new; +} ecere_gcc_struct _new; struct { struct TypeName * typeName; struct Expression * size; struct Expression * exp; -} __attribute__ ((gcc_struct)) _renew; +} ecere_gcc_struct _renew; struct { char * table; struct Identifier * id; -} __attribute__ ((gcc_struct)) db; +} ecere_gcc_struct db; struct { struct Expression * ds; struct Expression * name; -} __attribute__ ((gcc_struct)) dbopen; +} ecere_gcc_struct dbopen; struct { struct TypeName * typeName; struct Initializer * initializer; -} __attribute__ ((gcc_struct)) initializer; +} ecere_gcc_struct initializer; struct { struct Expression * exp; struct TypeName * typeName; -} __attribute__ ((gcc_struct)) vaArg; -} __attribute__ ((gcc_struct)) __anon1; +} ecere_gcc_struct vaArg; +} ecere_gcc_struct __anon1; unsigned int debugValue; struct __ecereNameSpace__ecere__com__DataValue val; uint64 address; @@ -817,7 +820,7 @@ unsigned int needCast; unsigned int thisPtr; unsigned int opDestType; unsigned int needTemplateCast; -} __attribute__ ((gcc_struct)); +} ecere_gcc_struct; extern struct Declarator * SpecDeclFromString(const char * string, struct __ecereNameSpace__ecere__sys__OldList * specs, struct Declarator * baseDecl); @@ -843,26 +846,26 @@ struct struct Expression * exp; struct Expression * posExp; struct Attrib * attrib; -} __attribute__ ((gcc_struct)) structDecl; +} ecere_gcc_struct structDecl; struct { struct Expression * exp; struct Specifier * enumClass; -} __attribute__ ((gcc_struct)) array; +} ecere_gcc_struct array; struct { struct __ecereNameSpace__ecere__sys__OldList * parameters; -} __attribute__ ((gcc_struct)) function; +} ecere_gcc_struct function; struct { struct Pointer * pointer; -} __attribute__ ((gcc_struct)) pointer; +} ecere_gcc_struct pointer; struct { struct ExtDecl * extended; -} __attribute__ ((gcc_struct)) extended; -} __attribute__ ((gcc_struct)) __anon1; -} __attribute__ ((gcc_struct)); +} ecere_gcc_struct extended; +} ecere_gcc_struct __anon1; +} ecere_gcc_struct; static void ProcessInitializer(struct Initializer * init) { @@ -898,7 +901,7 @@ union struct __ecereNameSpace__ecere__com__Method * method; struct __ecereNameSpace__ecere__com__Property * _property; struct __ecereNameSpace__ecere__com__Class * registered; -} __attribute__ ((gcc_struct)) __anon1; +} ecere_gcc_struct __anon1; unsigned int notYetDeclared; union { @@ -906,20 +909,20 @@ struct { struct External * pointerExternal; struct External * structExternal; -} __attribute__ ((gcc_struct)) __anon1; +} ecere_gcc_struct __anon1; struct { struct External * externalGet; struct External * externalSet; struct External * externalPtr; struct External * externalIsSet; -} __attribute__ ((gcc_struct)) __anon2; +} ecere_gcc_struct __anon2; struct { struct External * methodExternal; struct External * methodCodeExternal; -} __attribute__ ((gcc_struct)) __anon3; -} __attribute__ ((gcc_struct)) __anon2; +} ecere_gcc_struct __anon3; +} ecere_gcc_struct __anon2; unsigned int imported; unsigned int declaredStructSym; struct __ecereNameSpace__ecere__com__Class * _class; @@ -947,7 +950,7 @@ struct Context * ctx; int isIterator; struct Expression * propCategory; unsigned int mustRegister; -} __attribute__ ((gcc_struct)); +} ecere_gcc_struct; struct ClassImport { @@ -958,7 +961,7 @@ struct __ecereNameSpace__ecere__sys__OldList methods; struct __ecereNameSpace__ecere__sys__OldList properties; unsigned int itself; int isRemote; -} __attribute__ ((gcc_struct)); +} ecere_gcc_struct; struct MembersInit; @@ -972,7 +975,7 @@ struct __ecereNameSpace__ecere__sys__BTNode * root; int count; int (* CompareKey)(struct __ecereNameSpace__ecere__sys__BinaryTree * tree, uintptr_t a, uintptr_t b); void (* FreeKey)(void * key); -} __attribute__ ((gcc_struct)); +} ecere_gcc_struct; unsigned int __ecereMethod___ecereNameSpace__ecere__sys__BinaryTree_Add(struct __ecereNameSpace__ecere__sys__BinaryTree * this, struct __ecereNameSpace__ecere__sys__BTNode * node); @@ -1002,7 +1005,7 @@ struct Type * type; struct Symbol * propSet; int tempCount; unsigned int propertyNoThis; -} __attribute__ ((gcc_struct)); +} ecere_gcc_struct; struct PropertyWatch; @@ -1014,7 +1017,7 @@ struct Location loc; struct Statement * compound; struct __ecereNameSpace__ecere__sys__OldList * properties; unsigned int deleteWatch; -} __attribute__ ((gcc_struct)); +} ecere_gcc_struct; struct InitDeclarator; @@ -1029,7 +1032,7 @@ struct InitDeclarator * next; struct Location loc; struct Declarator * declarator; struct Initializer * initializer; -} __attribute__ ((gcc_struct)); +} ecere_gcc_struct; struct __ecereNameSpace__ecere__com__DataMember; @@ -1041,7 +1044,7 @@ struct { const char * dataTypeString; struct __ecereNameSpace__ecere__com__Class * dataTypeClass; -} __attribute__ ((gcc_struct)) __anon1; +} ecere_gcc_struct __anon1; struct __ecereNameSpace__ecere__com__DataValue expression; struct { @@ -1051,10 +1054,10 @@ union struct __ecereNameSpace__ecere__com__DataMember * member; struct __ecereNameSpace__ecere__com__Property * prop; struct __ecereNameSpace__ecere__com__Method * method; -} __attribute__ ((gcc_struct)) __anon1; -} __attribute__ ((gcc_struct)) __anon2; -} __attribute__ ((gcc_struct)) __anon1; -} __attribute__ ((gcc_struct)); +} ecere_gcc_struct __anon1; +} ecere_gcc_struct __anon2; +} ecere_gcc_struct __anon1; +} ecere_gcc_struct; struct __ecereNameSpace__ecere__com__DataMember { @@ -1076,7 +1079,7 @@ struct __ecereNameSpace__ecere__sys__BinaryTree membersAlpha; int memberOffset; short structAlignment; short pointerAlignment; -} __attribute__ ((gcc_struct)); +} ecere_gcc_struct; extern void __ecereNameSpace__ecere__com__eClass_FindNextMember(struct __ecereNameSpace__ecere__com__Class * _class, struct __ecereNameSpace__ecere__com__Class ** curClass, struct __ecereNameSpace__ecere__com__DataMember ** curMember, struct __ecereNameSpace__ecere__com__DataMember ** subMemberStack, int * subMemberStackPos); @@ -1101,7 +1104,7 @@ struct Enumerator * next; struct Location loc; struct Identifier * id; struct Expression * exp; -} __attribute__ ((gcc_struct)); +} ecere_gcc_struct; struct AsmField; @@ -1113,7 +1116,7 @@ struct Location loc; char * command; struct Expression * expression; struct Identifier * symbolic; -} __attribute__ ((gcc_struct)); +} ecere_gcc_struct; struct __ecereNameSpace__ecere__com__BitMember; @@ -1133,7 +1136,7 @@ int type; int size; int pos; uint64 mask; -} __attribute__ ((gcc_struct)); +} ecere_gcc_struct; struct MemberInit; @@ -1148,7 +1151,7 @@ struct Initializer * initializer; unsigned int used; unsigned int variable; unsigned int takeOutExp; -} __attribute__ ((gcc_struct)); +} ecere_gcc_struct; extern struct MemberInit * MkMemberInit(struct __ecereNameSpace__ecere__sys__OldList * ids, struct Initializer * initializer); @@ -1173,7 +1176,7 @@ struct __ecereNameSpace__ecere__sys__BinaryTree templateTypes; struct ClassDefinition * classDef; unsigned int templateTypesOnly; unsigned int hasNameSpace; -} __attribute__ ((gcc_struct)); +} ecere_gcc_struct; struct External { @@ -1190,13 +1193,13 @@ struct Declaration * declaration; char * importString; struct Identifier * id; struct DBTableDef * table; -} __attribute__ ((gcc_struct)) __anon1; +} ecere_gcc_struct __anon1; int importType; struct External * fwdDecl; struct __ecereNameSpace__ecere__com__Instance * outgoing; struct __ecereNameSpace__ecere__com__Instance * incoming; int nonBreakableIncoming; -} __attribute__ ((gcc_struct)); +} ecere_gcc_struct; struct ClassDefinition { @@ -1211,7 +1214,7 @@ struct Location blockStart; struct Location nameLoc; int declMode; unsigned int deleteWatchable; -} __attribute__ ((gcc_struct)); +} ecere_gcc_struct; void __ecereMethod_External_CreateUniqueEdge(struct External * this, struct External * from, unsigned int soft); @@ -1229,8 +1232,8 @@ union { struct __ecereNameSpace__ecere__sys__OldList * dataMembers; struct ClassFunction * function; -} __attribute__ ((gcc_struct)) __anon1; -} __attribute__ ((gcc_struct)); +} ecere_gcc_struct __anon1; +} ecere_gcc_struct; struct ClassFunction { @@ -1252,7 +1255,7 @@ unsigned int isDestructor; unsigned int dontMangle; int id; int idCode; -} __attribute__ ((gcc_struct)); +} ecere_gcc_struct; static unsigned int ProcessInstMembers_SimpleMemberEnsure(struct __ecereNameSpace__ecere__com__DataMember * parentMember, struct Instantiation * inst, struct Expression * instExp, struct __ecereNameSpace__ecere__sys__OldList * list, unsigned int zeroOut) { @@ -1382,8 +1385,8 @@ struct unsigned int conversion : 1; unsigned int isWatchable : 1; unsigned int isDBProp : 1; -} __attribute__ ((gcc_struct)) __anon1; -} __attribute__ ((gcc_struct)); +} ecere_gcc_struct __anon1; +} ecere_gcc_struct; struct __ecereNameSpace__ecere__com__NameSpace; @@ -1399,7 +1402,7 @@ struct __ecereNameSpace__ecere__sys__BinaryTree nameSpaces; struct __ecereNameSpace__ecere__sys__BinaryTree classes; struct __ecereNameSpace__ecere__sys__BinaryTree defines; struct __ecereNameSpace__ecere__sys__BinaryTree functions; -} __attribute__ ((gcc_struct)); +} ecere_gcc_struct; struct __ecereNameSpace__ecere__com__Class { @@ -1458,7 +1461,7 @@ struct __ecereNameSpace__ecere__sys__OldList templatized; int numParams; unsigned int isInstanceClass; unsigned int byValueSystemClass; -} __attribute__ ((gcc_struct)); +} ecere_gcc_struct; struct __ecereNameSpace__ecere__com__Application { @@ -1469,7 +1472,7 @@ unsigned int isGUIApp; struct __ecereNameSpace__ecere__sys__OldList allModules; char * parsedCommand; struct __ecereNameSpace__ecere__com__NameSpace systemNameSpace; -} __attribute__ ((gcc_struct)); +} ecere_gcc_struct; static unsigned int ProcessInstMembers(struct Instantiation * inst, struct Expression * instExp, struct __ecereNameSpace__ecere__sys__OldList * list, unsigned int zeroOut) { @@ -1938,7 +1941,7 @@ int importType; int origImportType; struct __ecereNameSpace__ecere__com__NameSpace privateNameSpace; struct __ecereNameSpace__ecere__com__NameSpace publicNameSpace; -} __attribute__ ((gcc_struct)); +} ecere_gcc_struct; static void CreateInstancesBody() { @@ -2305,7 +2308,7 @@ struct TemplateDatatype * templateDatatype; struct DBTableEntry * dbtableEntry; struct DBIndexItem * dbindexItem; struct DBTableDef * dbtableDef; -} __attribute__ ((gcc_struct)) YYSTYPE; +} ecere_gcc_struct YYSTYPE; extern YYSTYPE yylval; @@ -2328,11 +2331,11 @@ struct { struct Identifier * id; struct Initializer * initializer; -} __attribute__ ((gcc_struct)) __anon1; -} __attribute__ ((gcc_struct)) __anon1; +} ecere_gcc_struct __anon1; +} ecere_gcc_struct __anon1; int memberAccess; void * object; -} __attribute__ ((gcc_struct)); +} ecere_gcc_struct; static void ProcessSpecifier(struct Specifier * spec) { diff --git a/compiler/bootstrap/libec/bootstrap/pass2.c b/compiler/bootstrap/libec/bootstrap/pass2.c index 4406a74..05c96ee 100644 --- a/compiler/bootstrap/libec/bootstrap/pass2.c +++ b/compiler/bootstrap/libec/bootstrap/pass2.c @@ -38,11 +38,14 @@ typedef unsigned __int64 uint64; #if defined(_WIN32) # if defined(__GNUC__) || defined(__TINYC__) # define ecere_stdcall __attribute__((__stdcall__)) +# define ecere_gcc_struct __attribute__((gcc_struct)) # else # define ecere_stdcall __stdcall +# define ecere_gcc_struct # endif #else # define ecere_stdcall +# define ecere_gcc_struct #endif #include #include @@ -64,7 +67,7 @@ void * last; int count; unsigned int offset; unsigned int circ; -} __attribute__ ((gcc_struct)); +} ecere_gcc_struct; struct __ecereNameSpace__ecere__sys__BTNode; @@ -83,8 +86,8 @@ float f; double d; long long i64; uint64 ui64; -} __attribute__ ((gcc_struct)) __anon1; -} __attribute__ ((gcc_struct)); +} ecere_gcc_struct __anon1; +} ecere_gcc_struct; struct __ecereNameSpace__ecere__com__SerialBuffer { @@ -92,7 +95,7 @@ unsigned char * _buffer; unsigned int count; unsigned int _size; unsigned int pos; -} __attribute__ ((gcc_struct)); +} ecere_gcc_struct; extern void * __ecereNameSpace__ecere__com__eSystem_New(unsigned int size); @@ -128,7 +131,7 @@ int line; int charPos; int pos; int included; -} __attribute__ ((gcc_struct)); +} ecere_gcc_struct; struct ModuleImport; @@ -153,7 +156,7 @@ struct __ecereNameSpace__ecere__com__LinkList void * first; void * last; int count; -} __attribute__ ((gcc_struct)); +} ecere_gcc_struct; extern void Compiler_Error(const char * format, ...); @@ -187,7 +190,7 @@ struct Location { struct CodePosition start; struct CodePosition end; -} __attribute__ ((gcc_struct)); +} ecere_gcc_struct; extern struct Location yylloc; @@ -226,7 +229,7 @@ struct __ecereNameSpace__ecere__com__Instance void * * _vTbl; struct __ecereNameSpace__ecere__com__Class * _class; int _refCount; -} __attribute__ ((gcc_struct)); +} ecere_gcc_struct; extern long long __ecereNameSpace__ecere__com__eClass_GetProperty(struct __ecereNameSpace__ecere__com__Class * _class, const char * name); @@ -312,7 +315,7 @@ struct TemplateDatatype { struct __ecereNameSpace__ecere__sys__OldList * specifiers; struct Declarator * decl; -} __attribute__ ((gcc_struct)); +} ecere_gcc_struct; extern struct Declarator * CopyDeclarator(struct Declarator * declarator); @@ -354,26 +357,26 @@ struct struct Expression * exp; struct Expression * posExp; struct Attrib * attrib; -} __attribute__ ((gcc_struct)) structDecl; +} ecere_gcc_struct structDecl; struct { struct Expression * exp; struct Specifier * enumClass; -} __attribute__ ((gcc_struct)) array; +} ecere_gcc_struct array; struct { struct __ecereNameSpace__ecere__sys__OldList * parameters; -} __attribute__ ((gcc_struct)) function; +} ecere_gcc_struct function; struct { struct Pointer * pointer; -} __attribute__ ((gcc_struct)) pointer; +} ecere_gcc_struct pointer; struct { struct ExtDecl * extended; -} __attribute__ ((gcc_struct)) extended; -} __attribute__ ((gcc_struct)) __anon1; -} __attribute__ ((gcc_struct)); +} ecere_gcc_struct extended; +} ecere_gcc_struct __anon1; +} ecere_gcc_struct; extern void FreeIdentifier(struct Identifier * id); @@ -392,7 +395,7 @@ struct Symbol * classSym; struct Specifier * _class; char * string; struct Identifier * badID; -} __attribute__ ((gcc_struct)); +} ecere_gcc_struct; extern struct Declarator * MkDeclaratorIdentifier(struct Identifier * id); @@ -426,7 +429,7 @@ const char * category; unsigned int compiled; unsigned int selfWatchable; unsigned int isWatchable; -} __attribute__ ((gcc_struct)); +} ecere_gcc_struct; extern struct Type * MkClassType(const char * name); @@ -461,7 +464,7 @@ unsigned char * data; struct Location nameLoc; struct Location insideLoc; unsigned int built; -} __attribute__ ((gcc_struct)); +} ecere_gcc_struct; struct TypeName; @@ -474,7 +477,7 @@ struct __ecereNameSpace__ecere__sys__OldList * qualifiers; struct Declarator * declarator; int classObjectType; struct Expression * bitCount; -} __attribute__ ((gcc_struct)); +} ecere_gcc_struct; extern struct TypeName * MkTypeName(struct __ecereNameSpace__ecere__sys__OldList * qualifiers, struct Declarator * declarator); @@ -501,51 +504,51 @@ struct { struct Identifier * id; struct Statement * stmt; -} __attribute__ ((gcc_struct)) labeled; +} ecere_gcc_struct labeled; struct { struct Expression * exp; struct Statement * stmt; -} __attribute__ ((gcc_struct)) caseStmt; +} ecere_gcc_struct caseStmt; struct { struct __ecereNameSpace__ecere__sys__OldList * declarations; struct __ecereNameSpace__ecere__sys__OldList * statements; struct Context * context; unsigned int isSwitch; -} __attribute__ ((gcc_struct)) compound; +} ecere_gcc_struct compound; struct { struct __ecereNameSpace__ecere__sys__OldList * exp; struct Statement * stmt; struct Statement * elseStmt; -} __attribute__ ((gcc_struct)) ifStmt; +} ecere_gcc_struct ifStmt; struct { struct __ecereNameSpace__ecere__sys__OldList * exp; struct Statement * stmt; -} __attribute__ ((gcc_struct)) switchStmt; +} ecere_gcc_struct switchStmt; struct { struct __ecereNameSpace__ecere__sys__OldList * exp; struct Statement * stmt; -} __attribute__ ((gcc_struct)) whileStmt; +} ecere_gcc_struct whileStmt; struct { struct __ecereNameSpace__ecere__sys__OldList * exp; struct Statement * stmt; -} __attribute__ ((gcc_struct)) doWhile; +} ecere_gcc_struct doWhile; struct { struct Statement * init; struct Statement * check; struct __ecereNameSpace__ecere__sys__OldList * increment; struct Statement * stmt; -} __attribute__ ((gcc_struct)) forStmt; +} ecere_gcc_struct forStmt; struct { struct Identifier * id; -} __attribute__ ((gcc_struct)) gotoStmt; +} ecere_gcc_struct gotoStmt; struct { struct Specifier * spec; @@ -553,23 +556,23 @@ char * statements; struct __ecereNameSpace__ecere__sys__OldList * inputFields; struct __ecereNameSpace__ecere__sys__OldList * outputFields; struct __ecereNameSpace__ecere__sys__OldList * clobberedFields; -} __attribute__ ((gcc_struct)) asmStmt; +} ecere_gcc_struct asmStmt; struct { struct Expression * watcher; struct Expression * object; struct __ecereNameSpace__ecere__sys__OldList * watches; -} __attribute__ ((gcc_struct)) _watch; +} ecere_gcc_struct _watch; struct { struct Identifier * id; struct __ecereNameSpace__ecere__sys__OldList * exp; struct __ecereNameSpace__ecere__sys__OldList * filter; struct Statement * stmt; -} __attribute__ ((gcc_struct)) forEachStmt; +} ecere_gcc_struct forEachStmt; struct Declaration * decl; -} __attribute__ ((gcc_struct)) __anon1; -} __attribute__ ((gcc_struct)); +} ecere_gcc_struct __anon1; +} ecere_gcc_struct; extern struct Declaration * MkDeclaration(struct __ecereNameSpace__ecere__sys__OldList * specifiers, struct __ecereNameSpace__ecere__sys__OldList * initDeclarators); @@ -587,18 +590,18 @@ struct { struct __ecereNameSpace__ecere__sys__OldList * specifiers; struct __ecereNameSpace__ecere__sys__OldList * declarators; -} __attribute__ ((gcc_struct)) __anon1; +} ecere_gcc_struct __anon1; struct Instantiation * inst; struct { struct Identifier * id; struct Expression * exp; -} __attribute__ ((gcc_struct)) __anon2; -} __attribute__ ((gcc_struct)) __anon1; +} ecere_gcc_struct __anon2; +} ecere_gcc_struct __anon1; struct Specifier * extStorage; struct Symbol * symbol; int declMode; -} __attribute__ ((gcc_struct)); +} ecere_gcc_struct; struct Initializer; @@ -614,7 +617,7 @@ struct { char * constant; struct Identifier * identifier; -} __attribute__ ((gcc_struct)) __anon1; +} ecere_gcc_struct __anon1; struct Statement * compound; struct Instantiation * instance; struct @@ -622,86 +625,86 @@ struct char * string; unsigned int intlString; unsigned int wideString; -} __attribute__ ((gcc_struct)) __anon2; +} ecere_gcc_struct __anon2; struct __ecereNameSpace__ecere__sys__OldList * list; struct { struct __ecereNameSpace__ecere__sys__OldList * specifiers; struct Declarator * decl; -} __attribute__ ((gcc_struct)) _classExp; +} ecere_gcc_struct _classExp; struct { struct Identifier * id; -} __attribute__ ((gcc_struct)) classData; +} ecere_gcc_struct classData; struct { struct Expression * exp; struct __ecereNameSpace__ecere__sys__OldList * arguments; struct Location argLoc; -} __attribute__ ((gcc_struct)) call; +} ecere_gcc_struct call; struct { struct Expression * exp; struct __ecereNameSpace__ecere__sys__OldList * index; -} __attribute__ ((gcc_struct)) index; +} ecere_gcc_struct index; struct { struct Expression * exp; struct Identifier * member; int memberType; unsigned int thisPtr; -} __attribute__ ((gcc_struct)) member; +} ecere_gcc_struct member; struct { int op; struct Expression * exp1; struct Expression * exp2; -} __attribute__ ((gcc_struct)) op; +} ecere_gcc_struct op; struct TypeName * typeName; struct Specifier * _class; struct { struct TypeName * typeName; struct Expression * exp; -} __attribute__ ((gcc_struct)) cast; +} ecere_gcc_struct cast; struct { struct Expression * cond; struct __ecereNameSpace__ecere__sys__OldList * exp; struct Expression * elseExp; -} __attribute__ ((gcc_struct)) cond; +} ecere_gcc_struct cond; struct { struct TypeName * typeName; struct Expression * size; -} __attribute__ ((gcc_struct)) _new; +} ecere_gcc_struct _new; struct { struct TypeName * typeName; struct Expression * size; struct Expression * exp; -} __attribute__ ((gcc_struct)) _renew; +} ecere_gcc_struct _renew; struct { char * table; struct Identifier * id; -} __attribute__ ((gcc_struct)) db; +} ecere_gcc_struct db; struct { struct Expression * ds; struct Expression * name; -} __attribute__ ((gcc_struct)) dbopen; +} ecere_gcc_struct dbopen; struct { struct TypeName * typeName; struct Initializer * initializer; -} __attribute__ ((gcc_struct)) initializer; +} ecere_gcc_struct initializer; struct { struct Expression * exp; struct TypeName * typeName; -} __attribute__ ((gcc_struct)) vaArg; -} __attribute__ ((gcc_struct)) __anon1; +} ecere_gcc_struct vaArg; +} ecere_gcc_struct __anon1; unsigned int debugValue; struct __ecereNameSpace__ecere__com__DataValue val; uint64 address; @@ -717,7 +720,7 @@ unsigned int needCast; unsigned int thisPtr; unsigned int opDestType; unsigned int needTemplateCast; -} __attribute__ ((gcc_struct)); +} ecere_gcc_struct; extern struct Initializer * MkInitializerAssignment(struct Expression * exp); @@ -731,10 +734,10 @@ union { struct Expression * exp; struct __ecereNameSpace__ecere__sys__OldList * list; -} __attribute__ ((gcc_struct)) __anon1; +} ecere_gcc_struct __anon1; unsigned int isConstant; struct Identifier * id; -} __attribute__ ((gcc_struct)); +} ecere_gcc_struct; static void _FixRefExp(struct Expression ** expPtr, struct Expression ** memberExpPtr) { @@ -831,7 +834,7 @@ struct __ecereNameSpace__ecere__sys__BTNode * root; int count; int (* CompareKey)(struct __ecereNameSpace__ecere__sys__BinaryTree * tree, uintptr_t a, uintptr_t b); void (* FreeKey)(void * key); -} __attribute__ ((gcc_struct)); +} ecere_gcc_struct; unsigned int __ecereMethod___ecereNameSpace__ecere__sys__BinaryTree_Add(struct __ecereNameSpace__ecere__sys__BinaryTree * this, struct __ecereNameSpace__ecere__sys__BTNode * node); @@ -854,7 +857,7 @@ void * symbol; const char * dataTypeString; struct Type * dataType; int memberAccess; -} __attribute__ ((gcc_struct)); +} ecere_gcc_struct; struct Symbol { @@ -869,7 +872,7 @@ union struct __ecereNameSpace__ecere__com__Method * method; struct __ecereNameSpace__ecere__com__Property * _property; struct __ecereNameSpace__ecere__com__Class * registered; -} __attribute__ ((gcc_struct)) __anon1; +} ecere_gcc_struct __anon1; unsigned int notYetDeclared; union { @@ -877,20 +880,20 @@ struct { struct External * pointerExternal; struct External * structExternal; -} __attribute__ ((gcc_struct)) __anon1; +} ecere_gcc_struct __anon1; struct { struct External * externalGet; struct External * externalSet; struct External * externalPtr; struct External * externalIsSet; -} __attribute__ ((gcc_struct)) __anon2; +} ecere_gcc_struct __anon2; struct { struct External * methodExternal; struct External * methodCodeExternal; -} __attribute__ ((gcc_struct)) __anon3; -} __attribute__ ((gcc_struct)) __anon2; +} ecere_gcc_struct __anon3; +} ecere_gcc_struct __anon2; unsigned int imported; unsigned int declaredStructSym; struct __ecereNameSpace__ecere__com__Class * _class; @@ -918,7 +921,7 @@ struct Context * ctx; int isIterator; struct Expression * propCategory; unsigned int mustRegister; -} __attribute__ ((gcc_struct)); +} ecere_gcc_struct; extern void DeclareMethod(struct External * neededFor, struct __ecereNameSpace__ecere__com__Method * method, const char * name); @@ -932,7 +935,7 @@ struct Location loc; struct Statement * compound; struct __ecereNameSpace__ecere__sys__OldList * properties; unsigned int deleteWatch; -} __attribute__ ((gcc_struct)); +} ecere_gcc_struct; struct __ecereNameSpace__ecere__com__ClassProperty; @@ -950,7 +953,7 @@ long long (* Get)(struct __ecereNameSpace__ecere__com__Class *); const char * dataTypeString; struct Type * dataType; unsigned int constant; -} __attribute__ ((gcc_struct)); +} ecere_gcc_struct; struct __ecereNameSpace__ecere__com__Module; @@ -978,7 +981,7 @@ struct { struct __ecereNameSpace__ecere__sys__OldList members; char * enumName; -} __attribute__ ((gcc_struct)) __anon1; +} ecere_gcc_struct __anon1; struct { struct Type * returnType; @@ -986,13 +989,13 @@ struct __ecereNameSpace__ecere__sys__OldList params; struct Symbol * thisClass; unsigned int staticMethod; struct TemplateParameter * thisClassTemplate; -} __attribute__ ((gcc_struct)) __anon2; +} ecere_gcc_struct __anon2; struct { struct __ecereNameSpace__ecere__com__Method * method; struct __ecereNameSpace__ecere__com__Class * methodClass; struct __ecereNameSpace__ecere__com__Class * usedClass; -} __attribute__ ((gcc_struct)) __anon3; +} ecere_gcc_struct __anon3; struct { struct Type * arrayType; @@ -1000,10 +1003,10 @@ int arraySize; struct Expression * arraySizeExp; unsigned int freeExp; struct Symbol * enumClass; -} __attribute__ ((gcc_struct)) __anon4; +} ecere_gcc_struct __anon4; struct Type * type; struct TemplateParameter * templateParameter; -} __attribute__ ((gcc_struct)) __anon1; +} ecere_gcc_struct __anon1; int kind; unsigned int size; char * name; @@ -1030,7 +1033,7 @@ unsigned int typedByReference : 1; unsigned int casted : 1; unsigned int pointerAlignment : 1; unsigned int isLong : 1; -} __attribute__ ((gcc_struct)); +} ecere_gcc_struct; struct Specifier { @@ -1048,7 +1051,7 @@ char * name; struct Symbol * symbol; struct __ecereNameSpace__ecere__sys__OldList * templateArgs; struct Specifier * nsSpec; -} __attribute__ ((gcc_struct)) __anon1; +} ecere_gcc_struct __anon1; struct { struct Identifier * id; @@ -1058,12 +1061,12 @@ struct __ecereNameSpace__ecere__sys__OldList * definitions; unsigned int addNameSpace; struct Context * ctx; struct ExtDecl * extDeclStruct; -} __attribute__ ((gcc_struct)) __anon2; +} ecere_gcc_struct __anon2; struct Expression * expression; struct Specifier * _class; struct TemplateParameter * templateParameter; -} __attribute__ ((gcc_struct)) __anon1; -} __attribute__ ((gcc_struct)); +} ecere_gcc_struct __anon1; +} ecere_gcc_struct; extern struct Expression * GetTemplateArgExp(struct TemplateParameter * param, struct __ecereNameSpace__ecere__com__Class * curClass, unsigned int pointer); @@ -1080,11 +1083,11 @@ union { struct TemplateDatatype * dataType; int memberType; -} __attribute__ ((gcc_struct)) __anon1; +} ecere_gcc_struct __anon1; struct TemplateArgument * defaultArgument; const char * dataTypeString; struct Type * baseType; -} __attribute__ ((gcc_struct)); +} ecere_gcc_struct; unsigned int __ecereProp_Type_Get_isPointerType(struct Type * this); @@ -1105,7 +1108,7 @@ struct __ecereNameSpace__ecere__sys__BinaryTree templateTypes; struct ClassDefinition * classDef; unsigned int templateTypesOnly; unsigned int hasNameSpace; -} __attribute__ ((gcc_struct)); +} ecere_gcc_struct; struct ClassDefinition { @@ -1120,7 +1123,7 @@ struct Location blockStart; struct Location nameLoc; int declMode; unsigned int deleteWatchable; -} __attribute__ ((gcc_struct)); +} ecere_gcc_struct; struct AsmField; @@ -1132,7 +1135,7 @@ struct Location loc; char * command; struct Expression * expression; struct Identifier * symbolic; -} __attribute__ ((gcc_struct)); +} ecere_gcc_struct; struct PropertyDef; @@ -1154,8 +1157,8 @@ struct unsigned int conversion : 1; unsigned int isWatchable : 1; unsigned int isDBProp : 1; -} __attribute__ ((gcc_struct)) __anon1; -} __attribute__ ((gcc_struct)); +} ecere_gcc_struct __anon1; +} ecere_gcc_struct; struct __ecereNameSpace__ecere__com__BitMember; @@ -1175,7 +1178,7 @@ int type; int size; int pos; uint64 mask; -} __attribute__ ((gcc_struct)); +} ecere_gcc_struct; struct FunctionDefinition; @@ -1194,13 +1197,13 @@ struct Declaration * declaration; char * importString; struct Identifier * id; struct DBTableDef * table; -} __attribute__ ((gcc_struct)) __anon1; +} ecere_gcc_struct __anon1; int importType; struct External * fwdDecl; struct __ecereNameSpace__ecere__com__Instance * outgoing; struct __ecereNameSpace__ecere__com__Instance * incoming; int nonBreakableIncoming; -} __attribute__ ((gcc_struct)); +} ecere_gcc_struct; struct FunctionDefinition { @@ -1218,7 +1221,7 @@ struct Type * type; struct Symbol * propSet; int tempCount; unsigned int propertyNoThis; -} __attribute__ ((gcc_struct)); +} ecere_gcc_struct; struct ClassFunction; @@ -1232,8 +1235,8 @@ union { struct __ecereNameSpace__ecere__sys__OldList * dataMembers; struct ClassFunction * function; -} __attribute__ ((gcc_struct)) __anon1; -} __attribute__ ((gcc_struct)); +} ecere_gcc_struct __anon1; +} ecere_gcc_struct; struct ClassFunction { @@ -1255,7 +1258,7 @@ unsigned int isDestructor; unsigned int dontMangle; int id; int idCode; -} __attribute__ ((gcc_struct)); +} ecere_gcc_struct; struct InitDeclarator; @@ -1268,7 +1271,7 @@ struct InitDeclarator * next; struct Location loc; struct Declarator * declarator; struct Initializer * initializer; -} __attribute__ ((gcc_struct)); +} ecere_gcc_struct; struct MemberInit; @@ -1285,7 +1288,7 @@ struct Initializer * initializer; unsigned int used; unsigned int variable; unsigned int takeOutExp; -} __attribute__ ((gcc_struct)); +} ecere_gcc_struct; static struct Expression * FixReference(struct Expression * e, unsigned int wantReference); @@ -1331,7 +1334,7 @@ struct __ecereNameSpace__ecere__sys__BinaryTree nameSpaces; struct __ecereNameSpace__ecere__sys__BinaryTree classes; struct __ecereNameSpace__ecere__sys__BinaryTree defines; struct __ecereNameSpace__ecere__sys__BinaryTree functions; -} __attribute__ ((gcc_struct)); +} ecere_gcc_struct; struct __ecereNameSpace__ecere__com__Application { @@ -1342,7 +1345,7 @@ unsigned int isGUIApp; struct __ecereNameSpace__ecere__sys__OldList allModules; char * parsedCommand; struct __ecereNameSpace__ecere__com__NameSpace systemNameSpace; -} __attribute__ ((gcc_struct)); +} ecere_gcc_struct; struct __ecereNameSpace__ecere__com__Module { @@ -1360,7 +1363,7 @@ int importType; int origImportType; struct __ecereNameSpace__ecere__com__NameSpace privateNameSpace; struct __ecereNameSpace__ecere__com__NameSpace publicNameSpace; -} __attribute__ ((gcc_struct)); +} ecere_gcc_struct; void __ecereUnregisterModule_pass2(struct __ecereNameSpace__ecere__com__Instance * module) { @@ -1377,7 +1380,7 @@ struct { const char * dataTypeString; struct __ecereNameSpace__ecere__com__Class * dataTypeClass; -} __attribute__ ((gcc_struct)) __anon1; +} ecere_gcc_struct __anon1; struct __ecereNameSpace__ecere__com__DataValue expression; struct { @@ -1387,10 +1390,10 @@ union struct __ecereNameSpace__ecere__com__DataMember * member; struct __ecereNameSpace__ecere__com__Property * prop; struct __ecereNameSpace__ecere__com__Method * method; -} __attribute__ ((gcc_struct)) __anon1; -} __attribute__ ((gcc_struct)) __anon2; -} __attribute__ ((gcc_struct)) __anon1; -} __attribute__ ((gcc_struct)); +} ecere_gcc_struct __anon1; +} ecere_gcc_struct __anon2; +} ecere_gcc_struct __anon1; +} ecere_gcc_struct; struct __ecereNameSpace__ecere__com__DataMember { @@ -1412,7 +1415,7 @@ struct __ecereNameSpace__ecere__sys__BinaryTree membersAlpha; int memberOffset; short structAlignment; short pointerAlignment; -} __attribute__ ((gcc_struct)); +} ecere_gcc_struct; extern struct __ecereNameSpace__ecere__com__DataMember * __ecereNameSpace__ecere__com__eClass_FindDataMember(struct __ecereNameSpace__ecere__com__Class * _class, const char * name, struct __ecereNameSpace__ecere__com__Instance * module, struct __ecereNameSpace__ecere__com__DataMember ** subMemberStack, int * subMemberStackPos); @@ -1473,7 +1476,7 @@ struct __ecereNameSpace__ecere__sys__OldList templatized; int numParams; unsigned int isInstanceClass; unsigned int byValueSystemClass; -} __attribute__ ((gcc_struct)); +} ecere_gcc_struct; extern char * __ecereNameSpace__ecere__com__PrintString(struct __ecereNameSpace__ecere__com__Class * class, const void * object, ...); @@ -1614,7 +1617,7 @@ struct TemplateDatatype * templateDatatype; struct DBTableEntry * dbtableEntry; struct DBIndexItem * dbindexItem; struct DBTableDef * dbtableDef; -} __attribute__ ((gcc_struct)) YYSTYPE; +} ecere_gcc_struct YYSTYPE; extern YYSTYPE yylval; @@ -1637,11 +1640,11 @@ struct { struct Identifier * id; struct Initializer * initializer; -} __attribute__ ((gcc_struct)) __anon1; -} __attribute__ ((gcc_struct)) __anon1; +} ecere_gcc_struct __anon1; +} ecere_gcc_struct __anon1; int memberAccess; void * object; -} __attribute__ ((gcc_struct)); +} ecere_gcc_struct; static void ProcessInitializer(struct Initializer * init); diff --git a/compiler/bootstrap/libec/bootstrap/pass3.c b/compiler/bootstrap/libec/bootstrap/pass3.c index 12b8393..abc45e8 100644 --- a/compiler/bootstrap/libec/bootstrap/pass3.c +++ b/compiler/bootstrap/libec/bootstrap/pass3.c @@ -38,11 +38,14 @@ typedef unsigned __int64 uint64; #if defined(_WIN32) # if defined(__GNUC__) || defined(__TINYC__) # define ecere_stdcall __attribute__((__stdcall__)) +# define ecere_gcc_struct __attribute__((gcc_struct)) # else # define ecere_stdcall __stdcall +# define ecere_gcc_struct # endif #else # define ecere_stdcall +# define ecere_gcc_struct #endif #include #include @@ -62,7 +65,7 @@ void * last; int count; unsigned int offset; unsigned int circ; -} __attribute__ ((gcc_struct)); +} ecere_gcc_struct; struct __ecereNameSpace__ecere__sys__BTNode; @@ -81,8 +84,8 @@ float f; double d; long long i64; uint64 ui64; -} __attribute__ ((gcc_struct)) __anon1; -} __attribute__ ((gcc_struct)); +} ecere_gcc_struct __anon1; +} ecere_gcc_struct; struct __ecereNameSpace__ecere__com__SerialBuffer { @@ -90,7 +93,7 @@ unsigned char * _buffer; unsigned int count; unsigned int _size; unsigned int pos; -} __attribute__ ((gcc_struct)); +} ecere_gcc_struct; extern void * __ecereNameSpace__ecere__com__eSystem_New(unsigned int size); @@ -136,7 +139,7 @@ int line; int charPos; int pos; int included; -} __attribute__ ((gcc_struct)); +} ecere_gcc_struct; extern char * __ecereNameSpace__ecere__sys__CopyString(const char * string); @@ -159,13 +162,13 @@ struct __ecereNameSpace__ecere__com__LinkList void * first; void * last; int count; -} __attribute__ ((gcc_struct)); +} ecere_gcc_struct; struct __ecereNameSpace__ecere__com__LinkElement { void * prev; void * next; -} __attribute__ ((gcc_struct)); +} ecere_gcc_struct; extern void Compiler_Error(const char * format, ...); @@ -195,7 +198,7 @@ struct Location { struct CodePosition start; struct CodePosition end; -} __attribute__ ((gcc_struct)); +} ecere_gcc_struct; extern struct Location yylloc; @@ -207,8 +210,8 @@ union { char * s; struct Attrib * attr; -} __attribute__ ((gcc_struct)) __anon1; -} __attribute__ ((gcc_struct)); +} ecere_gcc_struct __anon1; +} ecere_gcc_struct; extern struct ExtDecl * MkExtDeclString(char * s); @@ -227,7 +230,7 @@ struct __ecereNameSpace__ecere__com__LinkElement out; struct External * from; struct External * to; unsigned int breakable; -} __attribute__ ((gcc_struct)); +} ecere_gcc_struct; struct __ecereNameSpace__ecere__com__Class; @@ -236,7 +239,7 @@ struct __ecereNameSpace__ecere__com__Instance void * * _vTbl; struct __ecereNameSpace__ecere__com__Class * _class; int _refCount; -} __attribute__ ((gcc_struct)); +} ecere_gcc_struct; extern long long __ecereNameSpace__ecere__com__eClass_GetProperty(struct __ecereNameSpace__ecere__com__Class * _class, const char * name); @@ -284,7 +287,7 @@ struct TemplateDatatype { struct __ecereNameSpace__ecere__sys__OldList * specifiers; struct Declarator * decl; -} __attribute__ ((gcc_struct)); +} ecere_gcc_struct; extern struct Declarator * QMkPtrDecl(const char * id); @@ -309,7 +312,7 @@ struct Symbol * classSym; struct Specifier * _class; char * string; struct Identifier * badID; -} __attribute__ ((gcc_struct)); +} ecere_gcc_struct; static void InstDeclPassIdentifier(struct Identifier * id) { @@ -360,7 +363,7 @@ const char * category; unsigned int compiled; unsigned int selfWatchable; unsigned int isWatchable; -} __attribute__ ((gcc_struct)); +} ecere_gcc_struct; extern struct Type * ProcessTypeString(const char * string, unsigned int staticMethod); @@ -389,7 +392,7 @@ struct __ecereNameSpace__ecere__sys__OldList * qualifiers; struct Declarator * declarator; int classObjectType; struct Expression * bitCount; -} __attribute__ ((gcc_struct)); +} ecere_gcc_struct; extern struct TypeName * MkTypeName(struct __ecereNameSpace__ecere__sys__OldList * qualifiers, struct Declarator * declarator); @@ -415,26 +418,26 @@ struct struct Expression * exp; struct Expression * posExp; struct Attrib * attrib; -} __attribute__ ((gcc_struct)) structDecl; +} ecere_gcc_struct structDecl; struct { struct Expression * exp; struct Specifier * enumClass; -} __attribute__ ((gcc_struct)) array; +} ecere_gcc_struct array; struct { struct __ecereNameSpace__ecere__sys__OldList * parameters; -} __attribute__ ((gcc_struct)) function; +} ecere_gcc_struct function; struct { struct Pointer * pointer; -} __attribute__ ((gcc_struct)) pointer; +} ecere_gcc_struct pointer; struct { struct ExtDecl * extended; -} __attribute__ ((gcc_struct)) extended; -} __attribute__ ((gcc_struct)) __anon1; -} __attribute__ ((gcc_struct)); +} ecere_gcc_struct extended; +} ecere_gcc_struct __anon1; +} ecere_gcc_struct; extern struct Pointer * MkPointer(struct __ecereNameSpace__ecere__sys__OldList * qualifiers, struct Pointer * pointer); @@ -447,7 +450,7 @@ struct Pointer * next; struct Location loc; struct __ecereNameSpace__ecere__sys__OldList * qualifiers; struct Pointer * pointer; -} __attribute__ ((gcc_struct)); +} ecere_gcc_struct; struct __ecereNameSpace__ecere__sys__BinaryTree; @@ -457,7 +460,7 @@ struct __ecereNameSpace__ecere__sys__BTNode * root; int count; int (* CompareKey)(struct __ecereNameSpace__ecere__sys__BinaryTree * tree, uintptr_t a, uintptr_t b); void (* FreeKey)(void * key); -} __attribute__ ((gcc_struct)); +} ecere_gcc_struct; struct __ecereNameSpace__ecere__com__Module; @@ -485,7 +488,7 @@ struct __ecereNameSpace__ecere__sys__BinaryTree membersAlpha; int memberOffset; short structAlignment; short pointerAlignment; -} __attribute__ ((gcc_struct)); +} ecere_gcc_struct; struct InitDeclarator; @@ -503,7 +506,7 @@ struct { const char * dataTypeString; struct __ecereNameSpace__ecere__com__Class * dataTypeClass; -} __attribute__ ((gcc_struct)) __anon1; +} ecere_gcc_struct __anon1; struct __ecereNameSpace__ecere__com__DataValue expression; struct { @@ -513,10 +516,10 @@ union struct __ecereNameSpace__ecere__com__DataMember * member; struct __ecereNameSpace__ecere__com__Property * prop; struct __ecereNameSpace__ecere__com__Method * method; -} __attribute__ ((gcc_struct)) __anon1; -} __attribute__ ((gcc_struct)) __anon2; -} __attribute__ ((gcc_struct)) __anon1; -} __attribute__ ((gcc_struct)); +} ecere_gcc_struct __anon1; +} ecere_gcc_struct __anon2; +} ecere_gcc_struct __anon1; +} ecere_gcc_struct; struct __ecereNameSpace__ecere__com__Method { @@ -533,7 +536,7 @@ void * symbol; const char * dataTypeString; struct Type * dataType; int memberAccess; -} __attribute__ ((gcc_struct)); +} ecere_gcc_struct; struct Symbol { @@ -548,7 +551,7 @@ union struct __ecereNameSpace__ecere__com__Method * method; struct __ecereNameSpace__ecere__com__Property * _property; struct __ecereNameSpace__ecere__com__Class * registered; -} __attribute__ ((gcc_struct)) __anon1; +} ecere_gcc_struct __anon1; unsigned int notYetDeclared; union { @@ -556,20 +559,20 @@ struct { struct External * pointerExternal; struct External * structExternal; -} __attribute__ ((gcc_struct)) __anon1; +} ecere_gcc_struct __anon1; struct { struct External * externalGet; struct External * externalSet; struct External * externalPtr; struct External * externalIsSet; -} __attribute__ ((gcc_struct)) __anon2; +} ecere_gcc_struct __anon2; struct { struct External * methodExternal; struct External * methodCodeExternal; -} __attribute__ ((gcc_struct)) __anon3; -} __attribute__ ((gcc_struct)) __anon2; +} ecere_gcc_struct __anon3; +} ecere_gcc_struct __anon2; unsigned int imported; unsigned int declaredStructSym; struct __ecereNameSpace__ecere__com__Class * _class; @@ -597,7 +600,7 @@ struct Context * ctx; int isIterator; struct Expression * propCategory; unsigned int mustRegister; -} __attribute__ ((gcc_struct)); +} ecere_gcc_struct; struct TemplateParameter; @@ -617,7 +620,7 @@ char * name; struct Symbol * symbol; struct __ecereNameSpace__ecere__sys__OldList * templateArgs; struct Specifier * nsSpec; -} __attribute__ ((gcc_struct)) __anon1; +} ecere_gcc_struct __anon1; struct { struct Identifier * id; @@ -627,12 +630,12 @@ struct __ecereNameSpace__ecere__sys__OldList * definitions; unsigned int addNameSpace; struct Context * ctx; struct ExtDecl * extDeclStruct; -} __attribute__ ((gcc_struct)) __anon2; +} ecere_gcc_struct __anon2; struct Expression * expression; struct Specifier * _class; struct TemplateParameter * templateParameter; -} __attribute__ ((gcc_struct)) __anon1; -} __attribute__ ((gcc_struct)); +} ecere_gcc_struct __anon1; +} ecere_gcc_struct; struct TemplateParameter { @@ -645,11 +648,11 @@ union { struct TemplateDatatype * dataType; int memberType; -} __attribute__ ((gcc_struct)) __anon1; +} ecere_gcc_struct __anon1; struct TemplateArgument * defaultArgument; const char * dataTypeString; struct Type * baseType; -} __attribute__ ((gcc_struct)); +} ecere_gcc_struct; struct Type { @@ -663,7 +666,7 @@ struct { struct __ecereNameSpace__ecere__sys__OldList members; char * enumName; -} __attribute__ ((gcc_struct)) __anon1; +} ecere_gcc_struct __anon1; struct { struct Type * returnType; @@ -671,13 +674,13 @@ struct __ecereNameSpace__ecere__sys__OldList params; struct Symbol * thisClass; unsigned int staticMethod; struct TemplateParameter * thisClassTemplate; -} __attribute__ ((gcc_struct)) __anon2; +} ecere_gcc_struct __anon2; struct { struct __ecereNameSpace__ecere__com__Method * method; struct __ecereNameSpace__ecere__com__Class * methodClass; struct __ecereNameSpace__ecere__com__Class * usedClass; -} __attribute__ ((gcc_struct)) __anon3; +} ecere_gcc_struct __anon3; struct { struct Type * arrayType; @@ -685,10 +688,10 @@ int arraySize; struct Expression * arraySizeExp; unsigned int freeExp; struct Symbol * enumClass; -} __attribute__ ((gcc_struct)) __anon4; +} ecere_gcc_struct __anon4; struct Type * type; struct TemplateParameter * templateParameter; -} __attribute__ ((gcc_struct)) __anon1; +} ecere_gcc_struct __anon1; int kind; unsigned int size; char * name; @@ -715,7 +718,7 @@ unsigned int typedByReference : 1; unsigned int casted : 1; unsigned int pointerAlignment : 1; unsigned int isLong : 1; -} __attribute__ ((gcc_struct)); +} ecere_gcc_struct; unsigned int IsVoidPtrCast(struct TypeName * typeName) { @@ -749,7 +752,7 @@ struct Enumerator * next; struct Location loc; struct Identifier * id; struct Expression * exp; -} __attribute__ ((gcc_struct)); +} ecere_gcc_struct; struct Initializer; @@ -763,10 +766,10 @@ union { struct Expression * exp; struct __ecereNameSpace__ecere__sys__OldList * list; -} __attribute__ ((gcc_struct)) __anon1; +} ecere_gcc_struct __anon1; unsigned int isConstant; struct Identifier * id; -} __attribute__ ((gcc_struct)); +} ecere_gcc_struct; struct InitDeclarator { @@ -775,7 +778,7 @@ struct InitDeclarator * next; struct Location loc; struct Declarator * declarator; struct Initializer * initializer; -} __attribute__ ((gcc_struct)); +} ecere_gcc_struct; struct Declaration; @@ -798,11 +801,11 @@ struct { struct Identifier * id; struct Initializer * initializer; -} __attribute__ ((gcc_struct)) __anon1; -} __attribute__ ((gcc_struct)) __anon1; +} ecere_gcc_struct __anon1; +} ecere_gcc_struct __anon1; int memberAccess; void * object; -} __attribute__ ((gcc_struct)); +} ecere_gcc_struct; struct Declaration { @@ -816,18 +819,18 @@ struct { struct __ecereNameSpace__ecere__sys__OldList * specifiers; struct __ecereNameSpace__ecere__sys__OldList * declarators; -} __attribute__ ((gcc_struct)) __anon1; +} ecere_gcc_struct __anon1; struct Instantiation * inst; struct { struct Identifier * id; struct Expression * exp; -} __attribute__ ((gcc_struct)) __anon2; -} __attribute__ ((gcc_struct)) __anon1; +} ecere_gcc_struct __anon2; +} ecere_gcc_struct __anon1; struct Specifier * extStorage; struct Symbol * symbol; int declMode; -} __attribute__ ((gcc_struct)); +} ecere_gcc_struct; struct External { @@ -844,13 +847,13 @@ struct Declaration * declaration; char * importString; struct Identifier * id; struct DBTableDef * table; -} __attribute__ ((gcc_struct)) __anon1; +} ecere_gcc_struct __anon1; int importType; struct External * fwdDecl; struct __ecereNameSpace__ecere__com__Instance * outgoing; struct __ecereNameSpace__ecere__com__Instance * incoming; int nonBreakableIncoming; -} __attribute__ ((gcc_struct)); +} ecere_gcc_struct; struct External * __ecereMethod_External_ForwardDeclare(); @@ -864,7 +867,7 @@ struct Location loc; char * command; struct Expression * expression; struct Identifier * symbolic; -} __attribute__ ((gcc_struct)); +} ecere_gcc_struct; struct __ecereNameSpace__ecere__com__NameSpace; @@ -880,7 +883,7 @@ struct __ecereNameSpace__ecere__sys__BinaryTree nameSpaces; struct __ecereNameSpace__ecere__sys__BinaryTree classes; struct __ecereNameSpace__ecere__sys__BinaryTree defines; struct __ecereNameSpace__ecere__sys__BinaryTree functions; -} __attribute__ ((gcc_struct)); +} ecere_gcc_struct; struct __ecereNameSpace__ecere__com__Class { @@ -939,7 +942,7 @@ struct __ecereNameSpace__ecere__sys__OldList templatized; int numParams; unsigned int isInstanceClass; unsigned int byValueSystemClass; -} __attribute__ ((gcc_struct)); +} ecere_gcc_struct; struct __ecereNameSpace__ecere__com__Application { @@ -950,7 +953,7 @@ unsigned int isGUIApp; struct __ecereNameSpace__ecere__sys__OldList allModules; char * parsedCommand; struct __ecereNameSpace__ecere__com__NameSpace systemNameSpace; -} __attribute__ ((gcc_struct)); +} ecere_gcc_struct; extern void __ecereNameSpace__ecere__com__PrintLn(struct __ecereNameSpace__ecere__com__Class * class, const void * object, ...); @@ -984,7 +987,7 @@ int importType; int origImportType; struct __ecereNameSpace__ecere__com__NameSpace privateNameSpace; struct __ecereNameSpace__ecere__com__NameSpace publicNameSpace; -} __attribute__ ((gcc_struct)); +} ecere_gcc_struct; static void ReplaceByInstancePtr(struct Specifier * spec, struct Declarator ** declPtr, int type) { @@ -1404,7 +1407,7 @@ struct TemplateDatatype * templateDatatype; struct DBTableEntry * dbtableEntry; struct DBIndexItem * dbindexItem; struct DBTableDef * dbtableDef; -} __attribute__ ((gcc_struct)) YYSTYPE; +} ecere_gcc_struct YYSTYPE; extern YYSTYPE yylval; @@ -1420,7 +1423,7 @@ struct { char * constant; struct Identifier * identifier; -} __attribute__ ((gcc_struct)) __anon1; +} ecere_gcc_struct __anon1; struct Statement * compound; struct Instantiation * instance; struct @@ -1428,86 +1431,86 @@ struct char * string; unsigned int intlString; unsigned int wideString; -} __attribute__ ((gcc_struct)) __anon2; +} ecere_gcc_struct __anon2; struct __ecereNameSpace__ecere__sys__OldList * list; struct { struct __ecereNameSpace__ecere__sys__OldList * specifiers; struct Declarator * decl; -} __attribute__ ((gcc_struct)) _classExp; +} ecere_gcc_struct _classExp; struct { struct Identifier * id; -} __attribute__ ((gcc_struct)) classData; +} ecere_gcc_struct classData; struct { struct Expression * exp; struct __ecereNameSpace__ecere__sys__OldList * arguments; struct Location argLoc; -} __attribute__ ((gcc_struct)) call; +} ecere_gcc_struct call; struct { struct Expression * exp; struct __ecereNameSpace__ecere__sys__OldList * index; -} __attribute__ ((gcc_struct)) index; +} ecere_gcc_struct index; struct { struct Expression * exp; struct Identifier * member; int memberType; unsigned int thisPtr; -} __attribute__ ((gcc_struct)) member; +} ecere_gcc_struct member; struct { int op; struct Expression * exp1; struct Expression * exp2; -} __attribute__ ((gcc_struct)) op; +} ecere_gcc_struct op; struct TypeName * typeName; struct Specifier * _class; struct { struct TypeName * typeName; struct Expression * exp; -} __attribute__ ((gcc_struct)) cast; +} ecere_gcc_struct cast; struct { struct Expression * cond; struct __ecereNameSpace__ecere__sys__OldList * exp; struct Expression * elseExp; -} __attribute__ ((gcc_struct)) cond; +} ecere_gcc_struct cond; struct { struct TypeName * typeName; struct Expression * size; -} __attribute__ ((gcc_struct)) _new; +} ecere_gcc_struct _new; struct { struct TypeName * typeName; struct Expression * size; struct Expression * exp; -} __attribute__ ((gcc_struct)) _renew; +} ecere_gcc_struct _renew; struct { char * table; struct Identifier * id; -} __attribute__ ((gcc_struct)) db; +} ecere_gcc_struct db; struct { struct Expression * ds; struct Expression * name; -} __attribute__ ((gcc_struct)) dbopen; +} ecere_gcc_struct dbopen; struct { struct TypeName * typeName; struct Initializer * initializer; -} __attribute__ ((gcc_struct)) initializer; +} ecere_gcc_struct initializer; struct { struct Expression * exp; struct TypeName * typeName; -} __attribute__ ((gcc_struct)) vaArg; -} __attribute__ ((gcc_struct)) __anon1; +} ecere_gcc_struct vaArg; +} ecere_gcc_struct __anon1; unsigned int debugValue; struct __ecereNameSpace__ecere__com__DataValue val; uint64 address; @@ -1523,7 +1526,7 @@ unsigned int needCast; unsigned int thisPtr; unsigned int opDestType; unsigned int needTemplateCast; -} __attribute__ ((gcc_struct)); +} ecere_gcc_struct; struct Statement { @@ -1538,51 +1541,51 @@ struct { struct Identifier * id; struct Statement * stmt; -} __attribute__ ((gcc_struct)) labeled; +} ecere_gcc_struct labeled; struct { struct Expression * exp; struct Statement * stmt; -} __attribute__ ((gcc_struct)) caseStmt; +} ecere_gcc_struct caseStmt; struct { struct __ecereNameSpace__ecere__sys__OldList * declarations; struct __ecereNameSpace__ecere__sys__OldList * statements; struct Context * context; unsigned int isSwitch; -} __attribute__ ((gcc_struct)) compound; +} ecere_gcc_struct compound; struct { struct __ecereNameSpace__ecere__sys__OldList * exp; struct Statement * stmt; struct Statement * elseStmt; -} __attribute__ ((gcc_struct)) ifStmt; +} ecere_gcc_struct ifStmt; struct { struct __ecereNameSpace__ecere__sys__OldList * exp; struct Statement * stmt; -} __attribute__ ((gcc_struct)) switchStmt; +} ecere_gcc_struct switchStmt; struct { struct __ecereNameSpace__ecere__sys__OldList * exp; struct Statement * stmt; -} __attribute__ ((gcc_struct)) whileStmt; +} ecere_gcc_struct whileStmt; struct { struct __ecereNameSpace__ecere__sys__OldList * exp; struct Statement * stmt; -} __attribute__ ((gcc_struct)) doWhile; +} ecere_gcc_struct doWhile; struct { struct Statement * init; struct Statement * check; struct __ecereNameSpace__ecere__sys__OldList * increment; struct Statement * stmt; -} __attribute__ ((gcc_struct)) forStmt; +} ecere_gcc_struct forStmt; struct { struct Identifier * id; -} __attribute__ ((gcc_struct)) gotoStmt; +} ecere_gcc_struct gotoStmt; struct { struct Specifier * spec; @@ -1590,23 +1593,23 @@ char * statements; struct __ecereNameSpace__ecere__sys__OldList * inputFields; struct __ecereNameSpace__ecere__sys__OldList * outputFields; struct __ecereNameSpace__ecere__sys__OldList * clobberedFields; -} __attribute__ ((gcc_struct)) asmStmt; +} ecere_gcc_struct asmStmt; struct { struct Expression * watcher; struct Expression * object; struct __ecereNameSpace__ecere__sys__OldList * watches; -} __attribute__ ((gcc_struct)) _watch; +} ecere_gcc_struct _watch; struct { struct Identifier * id; struct __ecereNameSpace__ecere__sys__OldList * exp; struct __ecereNameSpace__ecere__sys__OldList * filter; struct Statement * stmt; -} __attribute__ ((gcc_struct)) forEachStmt; +} ecere_gcc_struct forEachStmt; struct Declaration * decl; -} __attribute__ ((gcc_struct)) __anon1; -} __attribute__ ((gcc_struct)); +} ecere_gcc_struct __anon1; +} ecere_gcc_struct; struct FunctionDefinition { @@ -1624,7 +1627,7 @@ struct Type * type; struct Symbol * propSet; int tempCount; unsigned int propertyNoThis; -} __attribute__ ((gcc_struct)); +} ecere_gcc_struct; static void AddPointerCast(struct Expression * e) { diff --git a/compiler/bootstrap/libec/bootstrap/shortcuts.c b/compiler/bootstrap/libec/bootstrap/shortcuts.c index 25afe2f..da3e3a1 100644 --- a/compiler/bootstrap/libec/bootstrap/shortcuts.c +++ b/compiler/bootstrap/libec/bootstrap/shortcuts.c @@ -38,11 +38,14 @@ typedef unsigned __int64 uint64; #if defined(_WIN32) # if defined(__GNUC__) || defined(__TINYC__) # define ecere_stdcall __attribute__((__stdcall__)) +# define ecere_gcc_struct __attribute__((gcc_struct)) # else # define ecere_stdcall __stdcall +# define ecere_gcc_struct # endif #else # define ecere_stdcall +# define ecere_gcc_struct #endif #include #include @@ -69,7 +72,7 @@ void * last; int count; unsigned int offset; unsigned int circ; -} __attribute__ ((gcc_struct)); +} ecere_gcc_struct; struct __ecereNameSpace__ecere__sys__BTNode; @@ -90,8 +93,8 @@ float f; double d; long long i64; uint64 ui64; -} __attribute__ ((gcc_struct)) __anon1; -} __attribute__ ((gcc_struct)); +} ecere_gcc_struct __anon1; +} ecere_gcc_struct; struct __ecereNameSpace__ecere__com__SerialBuffer { @@ -99,7 +102,7 @@ unsigned char * _buffer; unsigned int count; unsigned int _size; unsigned int pos; -} __attribute__ ((gcc_struct)); +} ecere_gcc_struct; extern void * __ecereNameSpace__ecere__com__eSystem_New(unsigned int size); @@ -117,7 +120,7 @@ int line; int charPos; int pos; int included; -} __attribute__ ((gcc_struct)); +} ecere_gcc_struct; struct Symbol; @@ -164,7 +167,7 @@ struct Location { struct CodePosition start; struct CodePosition end; -} __attribute__ ((gcc_struct)); +} ecere_gcc_struct; void resetScannerPos(struct CodePosition * pos); @@ -278,7 +281,7 @@ struct __ecereNameSpace__ecere__com__Instance void * * _vTbl; struct __ecereNameSpace__ecere__com__Class * _class; int _refCount; -} __attribute__ ((gcc_struct)); +} ecere_gcc_struct; extern long long __ecereNameSpace__ecere__com__eClass_GetProperty(struct __ecereNameSpace__ecere__com__Class * _class, const char * name); @@ -324,7 +327,7 @@ const char * category; unsigned int compiled; unsigned int selfWatchable; unsigned int isWatchable; -} __attribute__ ((gcc_struct)); +} ecere_gcc_struct; extern void __ecereNameSpace__ecere__com__eInstance_FireSelfWatchers(struct __ecereNameSpace__ecere__com__Instance * instance, struct __ecereNameSpace__ecere__com__Property * _property); @@ -352,26 +355,26 @@ struct struct Expression * exp; struct Expression * posExp; struct Attrib * attrib; -} __attribute__ ((gcc_struct)) structDecl; +} ecere_gcc_struct structDecl; struct { struct Expression * exp; struct Specifier * enumClass; -} __attribute__ ((gcc_struct)) array; +} ecere_gcc_struct array; struct { struct __ecereNameSpace__ecere__sys__OldList * parameters; -} __attribute__ ((gcc_struct)) function; +} ecere_gcc_struct function; struct { struct Pointer * pointer; -} __attribute__ ((gcc_struct)) pointer; +} ecere_gcc_struct pointer; struct { struct ExtDecl * extended; -} __attribute__ ((gcc_struct)) extended; -} __attribute__ ((gcc_struct)) __anon1; -} __attribute__ ((gcc_struct)); +} ecere_gcc_struct extended; +} ecere_gcc_struct __anon1; +} ecere_gcc_struct; extern struct Declarator * CopyDeclarator(struct Declarator * declarator); @@ -392,7 +395,7 @@ struct __ecereNameSpace__ecere__sys__OldList * qualifiers; struct Declarator * declarator; int classObjectType; struct Expression * bitCount; -} __attribute__ ((gcc_struct)); +} ecere_gcc_struct; extern struct Declarator * MkStructDeclarator(struct Declarator * declarator, struct Expression * exp); @@ -471,7 +474,7 @@ struct __ecereNameSpace__ecere__sys__BTNode * root; int count; int (* CompareKey)(struct __ecereNameSpace__ecere__sys__BinaryTree * tree, uintptr_t a, uintptr_t b); void (* FreeKey)(void * key); -} __attribute__ ((gcc_struct)); +} ecere_gcc_struct; struct __ecereNameSpace__ecere__com__Method; @@ -490,7 +493,7 @@ void * symbol; const char * dataTypeString; struct Type * dataType; int memberAccess; -} __attribute__ ((gcc_struct)); +} ecere_gcc_struct; struct __ecereNameSpace__ecere__com__Module; @@ -510,7 +513,7 @@ struct __ecereNameSpace__ecere__sys__BinaryTree nameSpaces; struct __ecereNameSpace__ecere__sys__BinaryTree classes; struct __ecereNameSpace__ecere__sys__BinaryTree defines; struct __ecereNameSpace__ecere__sys__BinaryTree functions; -} __attribute__ ((gcc_struct)); +} ecere_gcc_struct; struct __ecereNameSpace__ecere__com__Application { @@ -521,7 +524,7 @@ unsigned int isGUIApp; struct __ecereNameSpace__ecere__sys__OldList allModules; char * parsedCommand; struct __ecereNameSpace__ecere__com__NameSpace systemNameSpace; -} __attribute__ ((gcc_struct)); +} ecere_gcc_struct; struct __ecereNameSpace__ecere__com__Module { @@ -539,7 +542,7 @@ int importType; int origImportType; struct __ecereNameSpace__ecere__com__NameSpace privateNameSpace; struct __ecereNameSpace__ecere__com__NameSpace publicNameSpace; -} __attribute__ ((gcc_struct)); +} ecere_gcc_struct; void __ecereUnregisterModule_shortcuts(struct __ecereNameSpace__ecere__com__Instance * module) { @@ -556,7 +559,7 @@ struct { const char * dataTypeString; struct __ecereNameSpace__ecere__com__Class * dataTypeClass; -} __attribute__ ((gcc_struct)) __anon1; +} ecere_gcc_struct __anon1; struct __ecereNameSpace__ecere__com__DataValue expression; struct { @@ -566,10 +569,10 @@ union struct __ecereNameSpace__ecere__com__DataMember * member; struct __ecereNameSpace__ecere__com__Property * prop; struct __ecereNameSpace__ecere__com__Method * method; -} __attribute__ ((gcc_struct)) __anon1; -} __attribute__ ((gcc_struct)) __anon2; -} __attribute__ ((gcc_struct)) __anon1; -} __attribute__ ((gcc_struct)); +} ecere_gcc_struct __anon1; +} ecere_gcc_struct __anon2; +} ecere_gcc_struct __anon1; +} ecere_gcc_struct; struct __ecereNameSpace__ecere__com__DataMember { @@ -591,7 +594,7 @@ struct __ecereNameSpace__ecere__sys__BinaryTree membersAlpha; int memberOffset; short structAlignment; short pointerAlignment; -} __attribute__ ((gcc_struct)); +} ecere_gcc_struct; struct __ecereNameSpace__ecere__com__Class { @@ -650,7 +653,7 @@ struct __ecereNameSpace__ecere__sys__OldList templatized; int numParams; unsigned int isInstanceClass; unsigned int byValueSystemClass; -} __attribute__ ((gcc_struct)); +} ecere_gcc_struct; extern struct __ecereNameSpace__ecere__com__Class * __ecereClass___ecereNameSpace__ecere__sys__TempFile; diff --git a/compiler/bootstrap/libec/bootstrap/type.c b/compiler/bootstrap/libec/bootstrap/type.c index 1b506fe..75d2029 100644 --- a/compiler/bootstrap/libec/bootstrap/type.c +++ b/compiler/bootstrap/libec/bootstrap/type.c @@ -38,11 +38,14 @@ typedef unsigned __int64 uint64; #if defined(_WIN32) # if defined(__GNUC__) || defined(__TINYC__) # define ecere_stdcall __attribute__((__stdcall__)) +# define ecere_gcc_struct __attribute__((gcc_struct)) # else # define ecere_stdcall __stdcall +# define ecere_gcc_struct # endif #else # define ecere_stdcall +# define ecere_gcc_struct #endif #include #include @@ -218,7 +221,7 @@ void * last; int count; unsigned int offset; unsigned int circ; -} __attribute__ ((gcc_struct)); +} ecere_gcc_struct; struct __ecereNameSpace__ecere__sys__BTNode; @@ -239,8 +242,8 @@ float f; double d; long long i64; uint64 ui64; -} __attribute__ ((gcc_struct)) __anon1; -} __attribute__ ((gcc_struct)); +} ecere_gcc_struct __anon1; +} ecere_gcc_struct; struct __ecereNameSpace__ecere__com__SerialBuffer { @@ -248,7 +251,7 @@ unsigned char * _buffer; unsigned int count; unsigned int _size; unsigned int pos; -} __attribute__ ((gcc_struct)); +} ecere_gcc_struct; extern void * __ecereNameSpace__ecere__com__eSystem_New(unsigned int size); @@ -294,7 +297,7 @@ int line; int charPos; int pos; int included; -} __attribute__ ((gcc_struct)); +} ecere_gcc_struct; extern size_t strlen(const char * ); @@ -340,7 +343,7 @@ struct Location { struct CodePosition start; struct CodePosition end; -} __attribute__ ((gcc_struct)); +} ecere_gcc_struct; extern void resetScannerPos(struct CodePosition * pos); @@ -353,7 +356,7 @@ struct Attrib struct Location loc; int type; struct __ecereNameSpace__ecere__sys__OldList * attribs; -} __attribute__ ((gcc_struct)); +} ecere_gcc_struct; extern void FreeAttrib(struct Attrib * attr); @@ -374,7 +377,7 @@ struct __ecereNameSpace__ecere__com__Instance void * * _vTbl; struct __ecereNameSpace__ecere__com__Class * _class; int _refCount; -} __attribute__ ((gcc_struct)); +} ecere_gcc_struct; extern long long __ecereNameSpace__ecere__com__eClass_GetProperty(struct __ecereNameSpace__ecere__com__Class * _class, const char * name); @@ -414,7 +417,7 @@ const char * category; unsigned int compiled; unsigned int selfWatchable; unsigned int isWatchable; -} __attribute__ ((gcc_struct)); +} ecere_gcc_struct; extern void __ecereNameSpace__ecere__com__eInstance_FireSelfWatchers(struct __ecereNameSpace__ecere__com__Instance * instance, struct __ecereNameSpace__ecere__com__Property * _property); @@ -461,7 +464,7 @@ struct Symbol * classSym; struct Specifier * _class; char * string; struct Identifier * badID; -} __attribute__ ((gcc_struct)); +} ecere_gcc_struct; extern struct Identifier * MkIdentifier(const char * string); @@ -489,7 +492,7 @@ char * name; struct Symbol * symbol; struct __ecereNameSpace__ecere__sys__OldList * templateArgs; struct Specifier * nsSpec; -} __attribute__ ((gcc_struct)) __anon1; +} ecere_gcc_struct __anon1; struct { struct Identifier * id; @@ -499,12 +502,12 @@ struct __ecereNameSpace__ecere__sys__OldList * definitions; unsigned int addNameSpace; struct Context * ctx; struct ExtDecl * extDeclStruct; -} __attribute__ ((gcc_struct)) __anon2; +} ecere_gcc_struct __anon2; struct Expression * expression; struct Specifier * _class; struct TemplateParameter * templateParameter; -} __attribute__ ((gcc_struct)) __anon1; -} __attribute__ ((gcc_struct)); +} ecere_gcc_struct __anon1; +} ecere_gcc_struct; extern struct Expression * MkExpBrackets(struct __ecereNameSpace__ecere__sys__OldList * expressions); @@ -577,7 +580,7 @@ struct Attribute * next; struct Location loc; char * attr; struct Expression * exp; -} __attribute__ ((gcc_struct)); +} ecere_gcc_struct; struct TemplateDatatype; @@ -603,8 +606,8 @@ union struct Expression * expression; struct Identifier * identifier; struct TemplateDatatype * templateDatatype; -} __attribute__ ((gcc_struct)) __anon1; -} __attribute__ ((gcc_struct)); +} ecere_gcc_struct __anon1; +} ecere_gcc_struct; struct ClassDef; @@ -640,7 +643,7 @@ struct TemplateDatatype { struct __ecereNameSpace__ecere__sys__OldList * specifiers; struct Declarator * decl; -} __attribute__ ((gcc_struct)); +} ecere_gcc_struct; extern struct Declarator * MkStructDeclarator(struct Declarator * declarator, struct Expression * exp); @@ -660,26 +663,26 @@ struct struct Expression * exp; struct Expression * posExp; struct Attrib * attrib; -} __attribute__ ((gcc_struct)) structDecl; +} ecere_gcc_struct structDecl; struct { struct Expression * exp; struct Specifier * enumClass; -} __attribute__ ((gcc_struct)) array; +} ecere_gcc_struct array; struct { struct __ecereNameSpace__ecere__sys__OldList * parameters; -} __attribute__ ((gcc_struct)) function; +} ecere_gcc_struct function; struct { struct Pointer * pointer; -} __attribute__ ((gcc_struct)) pointer; +} ecere_gcc_struct pointer; struct { struct ExtDecl * extended; -} __attribute__ ((gcc_struct)) extended; -} __attribute__ ((gcc_struct)) __anon1; -} __attribute__ ((gcc_struct)); +} ecere_gcc_struct extended; +} ecere_gcc_struct __anon1; +} ecere_gcc_struct; extern struct Declarator * MkDeclaratorBrackets(struct Declarator * declarator); @@ -706,7 +709,7 @@ struct __ecereNameSpace__ecere__sys__OldList * qualifiers; struct Declarator * declarator; int classObjectType; struct Expression * bitCount; -} __attribute__ ((gcc_struct)); +} ecere_gcc_struct; struct Initializer; @@ -721,7 +724,7 @@ struct InitDeclarator * next; struct Location loc; struct Declarator * declarator; struct Initializer * initializer; -} __attribute__ ((gcc_struct)); +} ecere_gcc_struct; struct Initializer { @@ -733,10 +736,10 @@ union { struct Expression * exp; struct __ecereNameSpace__ecere__sys__OldList * list; -} __attribute__ ((gcc_struct)) __anon1; +} ecere_gcc_struct __anon1; unsigned int isConstant; struct Identifier * id; -} __attribute__ ((gcc_struct)); +} ecere_gcc_struct; extern struct MemberInit * MkMemberInitExp(struct Expression * idExp, struct Initializer * initializer); @@ -751,7 +754,7 @@ struct Initializer * initializer; unsigned int used; unsigned int variable; unsigned int takeOutExp; -} __attribute__ ((gcc_struct)); +} ecere_gcc_struct; struct ClassDef { @@ -772,11 +775,11 @@ struct { struct Identifier * id; struct Initializer * initializer; -} __attribute__ ((gcc_struct)) __anon1; -} __attribute__ ((gcc_struct)) __anon1; +} ecere_gcc_struct __anon1; +} ecere_gcc_struct __anon1; int memberAccess; void * object; -} __attribute__ ((gcc_struct)); +} ecere_gcc_struct; extern struct Initializer * MkInitializerAssignment(struct Expression * exp); @@ -808,7 +811,7 @@ unsigned int isDestructor; unsigned int dontMangle; int id; int idCode; -} __attribute__ ((gcc_struct)); +} ecere_gcc_struct; extern struct PropertyDef * MkProperty(struct __ecereNameSpace__ecere__sys__OldList * specs, struct Declarator * decl, struct Identifier * id, struct Statement * setStmt, struct Statement * getStmt); @@ -830,8 +833,8 @@ struct unsigned int conversion : 1; unsigned int isWatchable : 1; unsigned int isDBProp : 1; -} __attribute__ ((gcc_struct)) __anon1; -} __attribute__ ((gcc_struct)); +} ecere_gcc_struct __anon1; +} ecere_gcc_struct; extern struct Statement * MkLabeledStmt(struct Identifier * id, struct Statement * statement); @@ -848,51 +851,51 @@ struct { struct Identifier * id; struct Statement * stmt; -} __attribute__ ((gcc_struct)) labeled; +} ecere_gcc_struct labeled; struct { struct Expression * exp; struct Statement * stmt; -} __attribute__ ((gcc_struct)) caseStmt; +} ecere_gcc_struct caseStmt; struct { struct __ecereNameSpace__ecere__sys__OldList * declarations; struct __ecereNameSpace__ecere__sys__OldList * statements; struct Context * context; unsigned int isSwitch; -} __attribute__ ((gcc_struct)) compound; +} ecere_gcc_struct compound; struct { struct __ecereNameSpace__ecere__sys__OldList * exp; struct Statement * stmt; struct Statement * elseStmt; -} __attribute__ ((gcc_struct)) ifStmt; +} ecere_gcc_struct ifStmt; struct { struct __ecereNameSpace__ecere__sys__OldList * exp; struct Statement * stmt; -} __attribute__ ((gcc_struct)) switchStmt; +} ecere_gcc_struct switchStmt; struct { struct __ecereNameSpace__ecere__sys__OldList * exp; struct Statement * stmt; -} __attribute__ ((gcc_struct)) whileStmt; +} ecere_gcc_struct whileStmt; struct { struct __ecereNameSpace__ecere__sys__OldList * exp; struct Statement * stmt; -} __attribute__ ((gcc_struct)) doWhile; +} ecere_gcc_struct doWhile; struct { struct Statement * init; struct Statement * check; struct __ecereNameSpace__ecere__sys__OldList * increment; struct Statement * stmt; -} __attribute__ ((gcc_struct)) forStmt; +} ecere_gcc_struct forStmt; struct { struct Identifier * id; -} __attribute__ ((gcc_struct)) gotoStmt; +} ecere_gcc_struct gotoStmt; struct { struct Specifier * spec; @@ -900,23 +903,23 @@ char * statements; struct __ecereNameSpace__ecere__sys__OldList * inputFields; struct __ecereNameSpace__ecere__sys__OldList * outputFields; struct __ecereNameSpace__ecere__sys__OldList * clobberedFields; -} __attribute__ ((gcc_struct)) asmStmt; +} ecere_gcc_struct asmStmt; struct { struct Expression * watcher; struct Expression * object; struct __ecereNameSpace__ecere__sys__OldList * watches; -} __attribute__ ((gcc_struct)) _watch; +} ecere_gcc_struct _watch; struct { struct Identifier * id; struct __ecereNameSpace__ecere__sys__OldList * exp; struct __ecereNameSpace__ecere__sys__OldList * filter; struct Statement * stmt; -} __attribute__ ((gcc_struct)) forEachStmt; +} ecere_gcc_struct forEachStmt; struct Declaration * decl; -} __attribute__ ((gcc_struct)) __anon1; -} __attribute__ ((gcc_struct)); +} ecere_gcc_struct __anon1; +} ecere_gcc_struct; extern struct Statement * MkCaseStmt(struct Expression * exp, struct Statement * statement); @@ -962,7 +965,7 @@ struct { char * constant; struct Identifier * identifier; -} __attribute__ ((gcc_struct)) __anon1; +} ecere_gcc_struct __anon1; struct Statement * compound; struct Instantiation * instance; struct @@ -970,86 +973,86 @@ struct char * string; unsigned int intlString; unsigned int wideString; -} __attribute__ ((gcc_struct)) __anon2; +} ecere_gcc_struct __anon2; struct __ecereNameSpace__ecere__sys__OldList * list; struct { struct __ecereNameSpace__ecere__sys__OldList * specifiers; struct Declarator * decl; -} __attribute__ ((gcc_struct)) _classExp; +} ecere_gcc_struct _classExp; struct { struct Identifier * id; -} __attribute__ ((gcc_struct)) classData; +} ecere_gcc_struct classData; struct { struct Expression * exp; struct __ecereNameSpace__ecere__sys__OldList * arguments; struct Location argLoc; -} __attribute__ ((gcc_struct)) call; +} ecere_gcc_struct call; struct { struct Expression * exp; struct __ecereNameSpace__ecere__sys__OldList * index; -} __attribute__ ((gcc_struct)) index; +} ecere_gcc_struct index; struct { struct Expression * exp; struct Identifier * member; int memberType; unsigned int thisPtr; -} __attribute__ ((gcc_struct)) member; +} ecere_gcc_struct member; struct { int op; struct Expression * exp1; struct Expression * exp2; -} __attribute__ ((gcc_struct)) op; +} ecere_gcc_struct op; struct TypeName * typeName; struct Specifier * _class; struct { struct TypeName * typeName; struct Expression * exp; -} __attribute__ ((gcc_struct)) cast; +} ecere_gcc_struct cast; struct { struct Expression * cond; struct __ecereNameSpace__ecere__sys__OldList * exp; struct Expression * elseExp; -} __attribute__ ((gcc_struct)) cond; +} ecere_gcc_struct cond; struct { struct TypeName * typeName; struct Expression * size; -} __attribute__ ((gcc_struct)) _new; +} ecere_gcc_struct _new; struct { struct TypeName * typeName; struct Expression * size; struct Expression * exp; -} __attribute__ ((gcc_struct)) _renew; +} ecere_gcc_struct _renew; struct { char * table; struct Identifier * id; -} __attribute__ ((gcc_struct)) db; +} ecere_gcc_struct db; struct { struct Expression * ds; struct Expression * name; -} __attribute__ ((gcc_struct)) dbopen; +} ecere_gcc_struct dbopen; struct { struct TypeName * typeName; struct Initializer * initializer; -} __attribute__ ((gcc_struct)) initializer; +} ecere_gcc_struct initializer; struct { struct Expression * exp; struct TypeName * typeName; -} __attribute__ ((gcc_struct)) vaArg; -} __attribute__ ((gcc_struct)) __anon1; +} ecere_gcc_struct vaArg; +} ecere_gcc_struct __anon1; unsigned int debugValue; struct __ecereNameSpace__ecere__com__DataValue val; uint64 address; @@ -1065,7 +1068,7 @@ unsigned int needCast; unsigned int thisPtr; unsigned int opDestType; unsigned int needTemplateCast; -} __attribute__ ((gcc_struct)); +} ecere_gcc_struct; extern struct Expression * MkExpInstance(struct Instantiation * inst); @@ -1081,18 +1084,18 @@ struct { struct __ecereNameSpace__ecere__sys__OldList * specifiers; struct __ecereNameSpace__ecere__sys__OldList * declarators; -} __attribute__ ((gcc_struct)) __anon1; +} ecere_gcc_struct __anon1; struct Instantiation * inst; struct { struct Identifier * id; struct Expression * exp; -} __attribute__ ((gcc_struct)) __anon2; -} __attribute__ ((gcc_struct)) __anon1; +} ecere_gcc_struct __anon2; +} ecere_gcc_struct __anon1; struct Specifier * extStorage; struct Symbol * symbol; int declMode; -} __attribute__ ((gcc_struct)); +} ecere_gcc_struct; extern struct Declaration * MkDeclarationInst(struct Instantiation * inst); @@ -1115,7 +1118,7 @@ unsigned char * data; struct Location nameLoc; struct Location insideLoc; unsigned int built; -} __attribute__ ((gcc_struct)); +} ecere_gcc_struct; extern struct Instantiation * MkInstantiation(struct Specifier * _class, struct Expression * exp, struct __ecereNameSpace__ecere__sys__OldList * members); @@ -1161,7 +1164,7 @@ struct TemplateDatatype * templateDatatype; struct DBTableEntry * dbtableEntry; struct DBIndexItem * dbindexItem; struct DBTableDef * dbtableDef; -} __attribute__ ((gcc_struct)) YYSTYPE; +} ecere_gcc_struct YYSTYPE; extern YYSTYPE yylval; @@ -1170,7 +1173,7 @@ union yyalloc yytype_int16 yyss_alloc; YYSTYPE yyvs_alloc; struct Location yyls_alloc; -} __attribute__ ((gcc_struct)); +} ecere_gcc_struct; static void yy_symbol_value_print(FILE * yyoutput, int yytype, YYSTYPE const * const yyvaluep, struct Location const * const yylocationp) { @@ -1201,8 +1204,8 @@ union { struct __ecereNameSpace__ecere__sys__OldList * dataMembers; struct ClassFunction * function; -} __attribute__ ((gcc_struct)) __anon1; -} __attribute__ ((gcc_struct)); +} ecere_gcc_struct __anon1; +} ecere_gcc_struct; extern struct MembersInit * MkMembersInitMethod(struct ClassFunction * function); @@ -1241,7 +1244,7 @@ struct __ecereNameSpace__ecere__sys__BTNode * root; int count; int (* CompareKey)(struct __ecereNameSpace__ecere__sys__BinaryTree * tree, uintptr_t a, uintptr_t b); void (* FreeKey)(void * key); -} __attribute__ ((gcc_struct)); +} ecere_gcc_struct; struct __ecereNameSpace__ecere__com__Method; @@ -1260,7 +1263,7 @@ void * symbol; const char * dataTypeString; struct Type * dataType; int memberAccess; -} __attribute__ ((gcc_struct)); +} ecere_gcc_struct; struct __ecereNameSpace__ecere__com__NameSpace; @@ -1276,7 +1279,7 @@ struct __ecereNameSpace__ecere__sys__BinaryTree nameSpaces; struct __ecereNameSpace__ecere__sys__BinaryTree classes; struct __ecereNameSpace__ecere__sys__BinaryTree defines; struct __ecereNameSpace__ecere__sys__BinaryTree functions; -} __attribute__ ((gcc_struct)); +} ecere_gcc_struct; struct __ecereNameSpace__ecere__com__Application { @@ -1287,7 +1290,7 @@ unsigned int isGUIApp; struct __ecereNameSpace__ecere__sys__OldList allModules; char * parsedCommand; struct __ecereNameSpace__ecere__com__NameSpace systemNameSpace; -} __attribute__ ((gcc_struct)); +} ecere_gcc_struct; struct __ecereNameSpace__ecere__com__DataMember; @@ -1299,7 +1302,7 @@ struct { const char * dataTypeString; struct __ecereNameSpace__ecere__com__Class * dataTypeClass; -} __attribute__ ((gcc_struct)) __anon1; +} ecere_gcc_struct __anon1; struct __ecereNameSpace__ecere__com__DataValue expression; struct { @@ -1309,10 +1312,10 @@ union struct __ecereNameSpace__ecere__com__DataMember * member; struct __ecereNameSpace__ecere__com__Property * prop; struct __ecereNameSpace__ecere__com__Method * method; -} __attribute__ ((gcc_struct)) __anon1; -} __attribute__ ((gcc_struct)) __anon2; -} __attribute__ ((gcc_struct)) __anon1; -} __attribute__ ((gcc_struct)); +} ecere_gcc_struct __anon1; +} ecere_gcc_struct __anon2; +} ecere_gcc_struct __anon1; +} ecere_gcc_struct; struct __ecereNameSpace__ecere__com__DataMember { @@ -1334,7 +1337,7 @@ struct __ecereNameSpace__ecere__sys__BinaryTree membersAlpha; int memberOffset; short structAlignment; short pointerAlignment; -} __attribute__ ((gcc_struct)); +} ecere_gcc_struct; struct __ecereNameSpace__ecere__com__Module; @@ -1354,7 +1357,7 @@ int importType; int origImportType; struct __ecereNameSpace__ecere__com__NameSpace privateNameSpace; struct __ecereNameSpace__ecere__com__NameSpace publicNameSpace; -} __attribute__ ((gcc_struct)); +} ecere_gcc_struct; struct __ecereNameSpace__ecere__com__Class { @@ -1413,7 +1416,7 @@ struct __ecereNameSpace__ecere__sys__OldList templatized; int numParams; unsigned int isInstanceClass; unsigned int byValueSystemClass; -} __attribute__ ((gcc_struct)); +} ecere_gcc_struct; void __ecereRegisterModule_type(struct __ecereNameSpace__ecere__com__Instance * module) { diff --git a/compiler/ecc/ecc.ec b/compiler/ecc/ecc.ec index 068fb86..900a267 100644 --- a/compiler/ecc/ecc.ec +++ b/compiler/ecc/ecc.ec @@ -692,11 +692,14 @@ class CompilerApp : Application output.Printf("#if defined(_WIN32)\n"); output.Printf("# if defined(__GNUC__) || defined(__TINYC__)\n"); output.Printf("# define ecere_stdcall __attribute__((__stdcall__))\n"); + output.Printf("# define ecere_gcc_struct __attribute__((gcc_struct))\n"); output.Printf("# else\n"); output.Printf("# define ecere_stdcall __stdcall\n"); + output.Printf("# define ecere_gcc_struct\n"); output.Printf("# endif\n"); output.Printf("#else\n"); output.Printf("# define ecere_stdcall\n"); + output.Printf("# define ecere_gcc_struct\n"); output.Printf("#endif\n"); if(buildingBootStrap) diff --git a/compiler/libec/src/output.ec b/compiler/libec/src/output.ec index 9b9053a..22d3d16 100644 --- a/compiler/libec/src/output.ec +++ b/compiler/libec/src/output.ec @@ -1,6 +1,6 @@ import "ecdefs" -#define NUM_ECC_ADDED_LINES 47 +#define NUM_ECC_ADDED_LINES 50 #define YYLTYPE Location @@ -1068,7 +1068,7 @@ static void OutputSpecifier(Specifier spec, File f, bool typeName) //OutputDeclaration(decl, f); OutputClassDef(def, f); } - f.Puts("} __attribute__ ((gcc_struct))"); + f.Puts("} ecere_gcc_struct"); } break; } -- 1.8.3.1