* src/SDCC.y (enum_specifier, enumerator_list, opt_assign_expr),
[fw/sdcc] / src / SDCCsymt.h
index c9e2adc3a268ecae6e81d5563cfd3101ae193fad..9a4860b82487dbab851e281cc4820713242dadb4 100644 (file)
@@ -86,6 +86,7 @@ typedef struct structdef
     unsigned char level;       /* Nesting level         */
     struct symbol *fields;     /* pointer to fields     */
     unsigned size;             /* sizeof the table in bytes  */
+    int type;                  /* STRUCT or UNION */
   }
 structdef;
 
@@ -538,10 +539,10 @@ int funcInChain (sym_link *);
 void addSymChain (symbol *);
 sym_link *structElemType (sym_link *, value *);
 symbol *getStructElement (structdef *, symbol *);
-sym_link *computeType (sym_link *, sym_link *);
+sym_link *computeType (sym_link *, sym_link *, bool promoteCharToInt);
 void processFuncArgs (symbol *);
 int isSymbolEqual (symbol *, symbol *);
-int powof2 (unsigned long);
+int powof2 (TYPE_UDWORD);
 void printTypeChain (sym_link *, FILE *);
 void printTypeChainRaw (sym_link *, FILE *);
 void initCSupport ();
@@ -559,6 +560,7 @@ void changePointer (symbol * sym);
 void checkTypeSanity(sym_link *etype, char *name);
 sym_link *typeFromStr (char *) ;
 STORAGE_CLASS sclsFromPtr(sym_link *ptr);
+sym_link *newEnumType (symbol *);
 
 
 extern char *nounName(sym_link *); /* noun strings */