changed some warnings to errors when codegen is skipped
authorjohanknol <johanknol@4a8a32a2-be11-0410-ad9d-d568d2c75423>
Sun, 3 Mar 2002 12:09:42 +0000 (12:09 +0000)
committerjohanknol <johanknol@4a8a32a2-be11-0410-ad9d-d568d2c75423>
Sun, 3 Mar 2002 12:09:42 +0000 (12:09 +0000)
git-svn-id: https://sdcc.svn.sourceforge.net/svnroot/sdcc/trunk/sdcc@1987 4a8a32a2-be11-0410-ad9d-d568d2c75423

src/SDCCglue.c
src/SDCCval.c
support/Util/SDCCerr.c
support/Util/SDCCerr.h

index 2b6cfa9fe172cf19a816c9093653bf4325dea5fa..7bb11bef41e1d86703e09cdf3b31c7b92a506b52 100644 (file)
@@ -333,7 +333,7 @@ initPointer (initList * ilist, sym_link *toType)
        if (IS_AST_OP(expr) && expr->opval.op==CAST &&
            IS_AST_OP(expr->right) && expr->right->opval.op=='&') {
          if (compareType(toType, expr->left->ftype)!=1) {
-           werror (W_INIT_WRONG);
+           werror (E_INIT_WRONG);
            printFromToType(expr->left->ftype, toType);
          }
          // skip the cast ???
@@ -427,7 +427,7 @@ initPointer (initList * ilist, sym_link *toType)
                return val;
        }
  wrong:
-       werror (W_INIT_WRONG);
+       werror (E_INIT_WRONG);
        return NULL;
 
 }
@@ -737,7 +737,7 @@ printIvalArray (symbol * sym, sym_link * type, initList * ilist,
   /* by a string                      */
   if (IS_CHAR (type->next)) {
     if (!IS_LITERAL(list2val(ilist)->etype)) {
-      werror (W_INIT_WRONG);
+      werror (E_CONST_EXPECTED);
       return;
     }
     if (printIvalChar (type,
@@ -971,7 +971,7 @@ printIvalPtr (symbol * sym, sym_link * type, initList * ilist, FILE * oFile)
 
   /* check the type      */
   if (compareType (type, val->type) == 0) {
-    werror (W_INIT_WRONG);
+    werror (E_INIT_WRONG);
     printFromToType (val->type, type);
   }
 
index a7528c4a8621215d62ec538de073007535462280..e861392109534e828725b1876aff65189ed4483f 100644 (file)
@@ -1468,7 +1468,7 @@ getNelements (sym_link * type, initList * ilist)
       value *v = (iast->type == EX_VALUE ? iast->opval.val : NULL);
       if (!v)
        {
-         werror (W_INIT_WRONG);
+         werror (E_CONST_EXPECTED);
          return 0;
        }
 
index 5aac4a73a2f00ece48a41172fdf0ad47bc31987e..e8b25529f1c21450822283324cc2e96d94c293c2 100644 (file)
@@ -87,7 +87,7 @@ struct
    "storage class not allowed for automatic variable '%s' in reentrant function unless static" },
 { E_AUTO_ABSA, ERROR_LEVEL_ERROR,
    "absolute address not allowed for automatic var '%s' in reentrant function " },
-{ W_INIT_WRONG, ERROR_LEVEL_WARNING,
+{ E_INIT_WRONG, ERROR_LEVEL_ERROR,
    "Initializer different levels of indirections" },
 { E_FUNC_REDEF, ERROR_LEVEL_ERROR,
    "Function name '%s' redefined " },
index fcd04ea873b4d08b0ea4eaa3bf66a39ba70cada7..f56b728a6429b5ccf42fa8e829af48ea4badadd2 100644 (file)
@@ -33,7 +33,7 @@ SDCCERR - SDCC Standard error handler
 #define  W_INIT_IGNORED    15        /* initialiser ignored  */
 #define  E_AUTO_ASSUMED    16        /* sclass auto assumed  */
 #define  E_AUTO_ABSA       17        /* abs addr for auto var*/
-#define  W_INIT_WRONG      18        /* initializer type !=  */
+#define  E_INIT_WRONG      18        /* initializer type !=  */
 #define  E_FUNC_REDEF      19        /* func name redefined  */
 #define  E_ID_UNDEF        20        /* identifer undefined  */
 #define  W_STACK_OVERFLOW  21        /* stack overflow       */