]> git.gag.com Git - fw/sdcc/commitdiff
Errors have E_, warnings have W_, Info's have I_
authorjohanknol <johanknol@4a8a32a2-be11-0410-ad9d-d568d2c75423>
Sun, 16 Sep 2001 14:04:32 +0000 (14:04 +0000)
committerjohanknol <johanknol@4a8a32a2-be11-0410-ad9d-d568d2c75423>
Sun, 16 Sep 2001 14:04:32 +0000 (14:04 +0000)
git-svn-id: https://sdcc.svn.sourceforge.net/svnroot/sdcc/trunk/sdcc@1276 4a8a32a2-be11-0410-ad9d-d568d2c75423

ChangeLog
src/SDCCglue.c
src/SDCCicode.c
src/SDCCsymt.c
src/SDCCval.c
support/Util/SDCCerr.c
support/Util/SDCCerr.h

index d304cfc9c7ee288f468bfff82a26d077b5e1de53..a6f8bbfad3dedbb905f308383a558a4979a6fce1 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,12 @@
+2001-09-16    <johan@FRIJA>
+
+       * support/Util/SDCCerr.c: fixed up the error/warning/info database. I only changed the E_ W_ I_ prefix to what SDCCerr.c says it is.
+
+2001-09-15    <johan@FRIJA>
+
+       * src/mcs51/ralloc.c: (findAssignToSym): fixed bug #460662 part 1
+       * src/ds390/ralloc.c (findAssignToSym): fixed bug #460662 part 1
+
 2001-09-11    <johan@FRIJA>
 
        * src/SDCCval.c (valDiv Mod Minus Plus Shift): keep litteral expressions as small as possible (bug #460010)
index bb3f4a0168741b367b8f8b4952c4f056bd7862ff..10843a5e93589797127f8964dc526d00644c1432 100644 (file)
@@ -374,7 +374,7 @@ initPointer (initList * ilist)
                return val;
        }
  wrong:
-       werror (E_INIT_WRONG);
+       werror (W_INIT_WRONG);
        return NULL;
 
 }
@@ -868,7 +868,7 @@ printIvalPtr (symbol * sym, sym_link * type, initList * ilist, FILE * oFile)
 
   /* check the type      */
   if (compareType (type, val->type) == 0)
-    werror (E_INIT_WRONG);
+    werror (W_INIT_WRONG);
 
   /* if val is literal */
   if (IS_LITERAL (val->etype))
index 2c99d04a33c50ccb4e8e99a3beda3cc0ba881e45..ebb5e9523748fc6424a72bd94e355e07327ae7d9 100644 (file)
@@ -1539,7 +1539,7 @@ geniCodeCast (sym_link * type, operand * op, bool implicit)
       (DCL_TYPE (optype) != DCL_TYPE (type)) &&
       !IS_GENPTR (type))
     {
-      werror (E_INCOMPAT_CAST);
+      werror (W_INCOMPAT_CAST);
       fprintf (stderr, "from type '");
       printTypeChain (optype, stderr);
       fprintf (stderr, "' to type '");
index 361c1db8038023abbf5f39daa0f1bcee53f56b8f..f9bc69a0f94bdd95193ac72ab8248acc3606b745 100644 (file)
@@ -1450,14 +1450,13 @@ compareType (sym_link * dest, sym_link * src)
        {
          if (DCL_TYPE (src) == DCL_TYPE (dest))
            return compareType (dest->next, src->next);
-         else if (IS_PTR (src) && IS_PTR (dest))
+         if (IS_PTR (src) && IS_PTR (dest))
            return -1;
-         else if (IS_PTR (dest) && IS_ARRAY (src))
+         if (IS_PTR (dest) && IS_ARRAY (src))
            return -1;
-         else if (IS_PTR (dest) && IS_FUNC (dest->next) && IS_FUNC (src))
+         if (IS_PTR (dest) && IS_FUNC (dest->next) && IS_FUNC (src))
            return -1 * compareType (dest->next, src);
-         else
-           return 0;
+         return 0;
        }
       else if (IS_PTR (dest) && IS_INTEGRAL (src))
        return -1;
@@ -1664,10 +1663,10 @@ checkFunction (symbol * sym)
   if (compareType (csym->type, sym->type) <= 0)
     {
       werror (E_PREV_DEF_CONFLICT, csym->name, "type");
-      werror (E_CONTINUE, "previous definition type ");
+      werror (W_CONTINUE, "previous definition type ");
       printTypeChain (csym->type, stderr);
       fprintf (stderr, "\n");
-      werror (E_CONTINUE, "current definition type ");
+      werror (W_CONTINUE, "current definition type ");
       printTypeChain (sym->type, stderr);
       fprintf (stderr, "\n");
       return 0;
index 984b82bd7216300a5d846b3f5cde603204aa8ec9..7c16fbdbbb5975c46fcfcd716e3fae275ba4c331 100644 (file)
@@ -1449,7 +1449,7 @@ getNelements (sym_link * type, initList * ilist)
       value *v = (iast->type == EX_VALUE ? iast->opval.val : NULL);
       if (!v)
        {
-         werror (E_INIT_WRONG);
+         werror (W_INIT_WRONG);
          return 0;
        }
 
index fd5d6a2033033e668646e3d680a4cf87f388cc25..b4308cd16a5ff4aea2d99eafc9a1fa6f3e64d0b3 100644 (file)
@@ -81,13 +81,13 @@ struct
 { E_SFR_INIT, ERROR_LEVEL_ERROR,
    "Absolute address & initial value both cannot be specified for\n"
    " a 'sfr','sbit' storage class, initial value ignored '%s'" },
-{ E_INIT_IGNORED, ERROR_LEVEL_WARNING,
+{ W_INIT_IGNORED, ERROR_LEVEL_WARNING,
    "Variable in the storage class cannot be initialized.'%s'" },
 { E_AUTO_ASSUMED, ERROR_LEVEL_ERROR,
    "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 " },
-{ E_INIT_WRONG, ERROR_LEVEL_WARNING,
+{ W_INIT_WRONG, ERROR_LEVEL_WARNING,
    "Initializer different levels of indirections" },
 { E_FUNC_REDEF, ERROR_LEVEL_ERROR,
    "Function name '%s' redefined " },
@@ -115,7 +115,7 @@ struct
    "type must be INT for bit field definition" },
 { E_BITFLD_SIZE, ERROR_LEVEL_ERROR,
    "bit field size greater than 16 . assuming 16" },
-{ E_TRUNCATION, ERROR_LEVEL_WARNING,
+{ W_TRUNCATION, ERROR_LEVEL_WARNING,
    "high order truncation might occur" },
 { E_CODE_WRITE, ERROR_LEVEL_ERROR,
    "Attempt to assign value to a constant variable %s" },
@@ -171,7 +171,7 @@ struct
    "void function returning value" },
 { E_VOID_FUNC, ERROR_LEVEL_ERROR,
    "function '%s' must return value" },
-{ E_RETURN_MISMATCH, ERROR_LEVEL_WARNING,
+{ W_RETURN_MISMATCH, ERROR_LEVEL_WARNING,
    "function return value mismatch" },
 { E_CASE_CONTEXT, ERROR_LEVEL_ERROR,
    "'case/default' found without 'switch'.statement ignored" },
@@ -207,13 +207,13 @@ struct
    "Pre-Processor %s" },
 { E_DUP_FAILED, ERROR_LEVEL_ERROR,
    "_dup call failed" },
-{ E_INCOMPAT_CAST, ERROR_LEVEL_WARNING,
+{ W_INCOMPAT_CAST, ERROR_LEVEL_WARNING,
    "pointer being cast to incompatible type " },
-{ E_LOOP_ELIMINATE, ERROR_LEVEL_WARNING,
+{ W_LOOP_ELIMINATE, ERROR_LEVEL_WARNING,
    "'while' loop with 'zero' constant.loop eliminated" },
 { W_NO_SIDE_EFFECTS, ERROR_LEVEL_WARNING,
    "%s expression has NO side effects.expr eliminated" },
-{ E_CONST_TOO_LARGE, ERROR_LEVEL_PEDANTIC,
+{ W_CONST_TOO_LARGE, ERROR_LEVEL_PEDANTIC,
    "constant value '%s', out of range." },
 { W_BAD_COMPARE, ERROR_LEVEL_WARNING,
    "comparison will either, ALWAYs succeed or ALWAYs fail" },
@@ -235,7 +235,7 @@ struct
    "storage class CANNOT be specified for bit variable '%s'" },
 { E_EXTERN_MISMATCH, ERROR_LEVEL_ERROR,
    "extern definition for '%s' mismatches with declaration." },
-{ E_NONRENT_ARGS, ERROR_LEVEL_WARNING,
+{ W_NONRENT_ARGS, ERROR_LEVEL_WARNING,
    "Functions called via pointers must be 'reentrant' to take arguments" },
 { W_DOUBLE_UNSUPPORTED, ERROR_LEVEL_WARNING,
    "type 'double' not supported assuming 'float'" },
@@ -259,7 +259,7 @@ struct
    "too few parameters" },
 { E_FUNC_NO_CODE, ERROR_LEVEL_ERROR,
    "code not generated for '%s' due to previous errors" },
-{ E_TYPE_MISMATCH_PARM, ERROR_LEVEL_WARNING,
+{ E_TYPE_MISMATCH_PARM, ERROR_LEVEL_ERROR,
    "type mismatch for parameter number %d" },
 { E_INVALID_FLOAT_CONST, ERROR_LEVEL_ERROR,
    "invalid float constant '%s'" },
@@ -269,7 +269,7 @@ struct
    "switch value not an integer" },
 { E_CASE_NON_INTEGER, ERROR_LEVEL_ERROR,
    "case label not an integer" },
-{ E_FUNC_TOO_LARGE, ERROR_LEVEL_WARNING,
+{ W_FUNC_TOO_LARGE, ERROR_LEVEL_WARNING,
    "function '%s' too large for global optimization" },
 { W_CONTROL_FLOW, ERROR_LEVEL_PEDANTIC,
    "conditional flow changed by optimizer '%s(%d)':so said EVELYN the modified DOG" },
@@ -277,9 +277,9 @@ struct
    "invalid type specifier for pointer type specifier ignored" },
 { W_IMPLICIT_FUNC, ERROR_LEVEL_WARNING,
    "function '%s' implicit declaration" },
-{ E_CONTINUE, ERROR_LEVEL_WARNING,
+{ W_CONTINUE, ERROR_LEVEL_WARNING,
    "%s" },
-{ W_TOOMANY_SPILS, ERROR_LEVEL_INFO,
+{ I_TOOMANY_SPILS, ERROR_LEVEL_INFO,
    "extended by %d bytes for compiler temp(s) :in function  '%s': %s " },
 { W_UNKNOWN_PRAGMA, ERROR_LEVEL_WARNING,
    "unknown or unsupported #pragma directive '%s'" },
index 8bcd4c48807e27c19cb4541db16df29f6a57839a..f2e91666cac9badc99cbabbb4d8bef1c1b99c0dd 100644 (file)
@@ -30,10 +30,10 @@ SDCCERR - SDCC Standard error handler
 #define  E_FUNCTION_EXPECTED  12     /* function expected    */
 #define  E_USING_ERROR     13        /* using in error       */
 #define  E_SFR_INIT        14        /* init error for sbit  */
-#define  E_INIT_IGNORED    15        /* initialiser ignored  */
+#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  E_INIT_WRONG      18        /* initializer type !=  */
+#define  W_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       */
@@ -47,7 +47,7 @@ SDCCERR - SDCC Standard error handler
 #define  E_CONV_ERR        29        /* conversion error     */
 #define  E_INT_REQD        30        /* bit field must be int*/
 #define  E_BITFLD_SIZE     31        /* bit field size > 16  */
-#define  E_TRUNCATION      32        /* high order trucation */
+#define  W_TRUNCATION      32        /* high order trucation */
 #define  E_CODE_WRITE      33        /* trying 2 write to code */
 #define  E_LVALUE_CONST    34        /* lvalue is a const   */   
 #define  E_ILLEGAL_ADDR    35        /* address of bit      */
@@ -75,7 +75,7 @@ SDCCERR - SDCC Standard error handler
 #define  E_LABEL_UNDEF     57        /* undefined label used   */
 #define  E_FUNC_VOID       58        /* void func ret value    */
 #define  E_VOID_FUNC       59        /* func must return value */
-#define  E_RETURN_MISMATCH 60        /* return value mismatch  */
+#define  W_RETURN_MISMATCH 60        /* return value mismatch  */
 #define  E_CASE_CONTEXT    61        /* case stmnt without switch */
 #define  E_CASE_CONSTANT   62        /* case expression ! const*/
 #define  E_BREAK_CONTEXT   63        /* break statement invalid*/
@@ -93,10 +93,10 @@ SDCCERR - SDCC Standard error handler
 #define         E_EXTERN_INIT     75        /* extern variable initialised     */
 #define  E_PRE_PROC_FAILED 76       /* preprocessor failed             */
 #define  E_DUP_FAILED     77        /* file DUP failed             */
-#define  E_INCOMPAT_CAST   78       /* incompatible pointer casting */
-#define  E_LOOP_ELIMINATE  79       /* loop eliminated                       */          
+#define  W_INCOMPAT_CAST   78       /* incompatible pointer casting */
+#define  W_LOOP_ELIMINATE  79       /* loop eliminated                       */          
 #define  W_NO_SIDE_EFFECTS  80      /* expression has no side effects */
-#define  E_CONST_TOO_LARGE  81      /* constant out of range             */
+#define  W_CONST_TOO_LARGE  81      /* constant out of range             */
 #define         W_BAD_COMPARE      82       /* bad comparison                            */
 #define  E_TERMINATING      83       /* compiler terminating                     */
 #define  W_LOCAL_NOINIT            84       /* local reference before assignment */
@@ -107,7 +107,7 @@ SDCCERR - SDCC Standard error handler
 #define  E_SFR_ADDR_RANGE   89         /* sfr address out of range                     */
 #define         E_BITVAR_STORAGE   90          /* storage given for 'bit' variable     */
 #define  E_EXTERN_MISMATCH  91         /* extern declaration mismatches    */
-#define  E_NONRENT_ARGS            92          /* fptr non reentrant has args          */
+#define  W_NONRENT_ARGS            92          /* fptr non reentrant has args          */
 #define  W_DOUBLE_UNSUPPORTED 93       /* 'double' not supported yet                   */
 #define  W_IF_NEVER_TRUE    94         /* if always false                                      */
 #define  W_FUNC_NO_RETURN   95         /* no return statement found            */
@@ -124,12 +124,12 @@ SDCCERR - SDCC Standard error handler
 #define  E_INVALID_OP      106          /* invalid operand for some operation */
 #define  E_SWITCH_NON_INTEGER 107       /* switch value not integer */
 #define  E_CASE_NON_INTEGER 108         /* case value not integer */
-#define  E_FUNC_TOO_LARGE   109         /* function too large     */
+#define  W_FUNC_TOO_LARGE   109         /* function too large     */
 #define  W_CONTROL_FLOW     110         /* control flow changed due to optimization */
 #define  W_PTR_TYPE_INVALID 111         /* invalid type specifier for pointer       */
 #define  W_IMPLICIT_FUNC    112         /* function declared implicitly             */
-#define  E_CONTINUE         113         /* more than one line                       */
-#define  W_TOOMANY_SPILS    114         /* too many spils occured                   */
+#define  W_CONTINUE         113         /* more than one line                       */
+#define  I_TOOMANY_SPILS    114         /* too many spils occured                   */
 #define  W_UNKNOWN_PRAGMA   115         /* #pragma directive unsupported            */
 #define  W_SHIFT_CHANGED    116         /* shift changed to zero                    */
 #define  W_UNKNOWN_OPTION   117         /* don't know the option                    */