The PIC Port was assuming ifx was always true. (A recent [valid] change
[fw/sdcc] / src / SDCCast.h
index a6ddbfb9fe3cf135119ecfcf9e1ab814a9f78124..32fe46922c9e6b8d960eaf5c4b87c835155c445e 100644 (file)
@@ -29,6 +29,7 @@
 #include "SDCCsymt.h"
 #include "SDCCval.h"
 #include "SDCCset.h"
+#include "SDCCmem.h"
 
 #define  EX_OP       0
 #define  EX_VALUE    1
@@ -42,7 +43,6 @@ typedef struct ast
 
     unsigned type:3;
     unsigned decorated:1;
-    unsigned hasVargs:1;
     unsigned isError:1;
     unsigned funcName:1;
     unsigned rvalue:1;
@@ -65,6 +65,7 @@ typedef struct ast
     union
       {
        char *inlineasm;        /* pointer to inline assembler code */
+       literalList *constlist; /* init list for array initializer. */
        symbol *sym;            /* if block then -> symbols */
        value *args;            /* if function then args    */
        /* if switch then switch values */
@@ -100,7 +101,6 @@ typedef struct ast
     sym_link *etype;           /* end of type chain for this subtree   */
 
     symbol *argSym;            /* argument symbols            */
-    value *args;               /* args of a function          */
     struct ast *left;          /* pointer to left tree        */
     struct ast *right;         /* pointer to right tree       */
     symbol *trueLabel;         /* if statement trueLabel */
@@ -130,6 +130,8 @@ ast;
                                   x->opval.op == EQ_OP ||              \
                                   x->opval.op == NE_OP ))
 #define IS_CAST_OP(x) (IS_AST_OP(x) && x->opval.op == CAST)
+#define IS_TERNARY_OP(x) (IS_AST_OP(x) && x->opval.op == '?')
+#define IS_COLON_OP(x) (IS_AST_OP(x) && x->opval.op == ':')
 #define IS_ADDRESS_OF_OP(x)    (IS_AST_OP(x)            &&              \
                                x->opval.op == '&'      &&              \
                                x->right == NULL )
@@ -168,7 +170,7 @@ ast;
 /* forward declarations for global variables */
 extern ast *staticAutos;
 extern FILE *codeOutFile;
-extern memmap *GcurMemmap;
+extern struct memmap *GcurMemmap;
 
 /* forward definitions for functions   */
 ast *newAst_VALUE (value * val);
@@ -205,5 +207,6 @@ void addSymToBlock (symbol *, ast *);
 // exported variables 
 extern set *operKeyReset;
 extern int noAlloc;
+extern int inInitMode;
 
 #endif