* src/SDCCast.c (createIvalStruct, createIvalArray, createIvalPtr, createIval): imple...
[fw/sdcc] / support / Util / SDCCerr.c
index 43391455abb6e17d5df1f643ff179842f8948c43..aa804d64c6c4e6db339b80c33bdfba7fa645b4b6 100644 (file)
 #define DEFAULT_ERROR_OUT      stderr
 #endif
 
-static struct {
-    ERROR_LOG_LEVEL logLevel;
-    FILE *out;
-    int style;                        /* 1=MSVC */
-    char disabled[MAX_ERROR_WARNING]; /* 1=warning disabled*/
-} _SDCCERRG;
+struct SDCCERRG _SDCCERRG; 
 
 extern char *filename ;
 extern int lineno ;
@@ -412,6 +407,31 @@ struct
    "sizeof applied to an incomplete type" },
 { E_PREVIOUS_DEF, ERROR_LEVEL_ERROR,
    "previously defined here" },
+{ W_SIZEOF_VOID, ERROR_LEVEL_WARNING,
+   "size of void is zero" },
+{ W_POSSBUG2, ERROR_LEVEL_WARNING,
+   "possible code generation error at %s line %d,\n"
+   " please report problem and send source code at SDCC-USER list on SF.Net"},
+{ W_COMPLEMENT, ERROR_LEVEL_WARNING,
+   "using ~ on bit/bool/unsigned char variables can give unexpected results due to promotion to int" },
+{ E_SHADOWREGS_NO_ISR, ERROR_LEVEL_ERROR,
+   "ISR function attribute 'shadowregs' following non-ISR function '%s'" },
+{ W_SFR_ABSRANGE, ERROR_LEVEL_WARNING,
+   "absolute address for sfr '%s' probably out of range." },
+{ E_BANKED_WITH_CALLEESAVES, ERROR_LEVEL_ERROR,
+   "Both banked and callee-saves cannot be used together." },
+{ W_INVALID_INT_CONST, ERROR_LEVEL_WARNING,
+   "integer constant '%s' out of range, truncated to %.0lf." },
+{ W_CMP_SU_CHAR, ERROR_LEVEL_PEDANTIC,
+   "comparison of 'signed char' with 'unsigned char' requires promotion to int" },
+{ W_INVALID_FLEXARRAY, ERROR_LEVEL_WARNING,
+   "invalid use of structure with flexible array member" },
+{ W_C89_NO_FLEXARRAY, ERROR_LEVEL_PEDANTIC,
+   "ISO C90 does not support flexible array members" },
+{ E_FLEXARRAY_NOTATEND, ERROR_LEVEL_ERROR,
+   "flexible array member not at end of struct" },
+{ E_FLEXARRAY_INEMPTYSTRCT, ERROR_LEVEL_ERROR,
+   "flexible array in otherwise empty struct" },
 };
 
 /*