From 6debd5bce497b8fda011030faa8749b6cff49aab Mon Sep 17 00:00:00 2001 From: johanknol Date: Sun, 3 Mar 2002 12:09:42 +0000 Subject: [PATCH] changed some warnings to errors when codegen is skipped git-svn-id: https://sdcc.svn.sourceforge.net/svnroot/sdcc/trunk/sdcc@1987 4a8a32a2-be11-0410-ad9d-d568d2c75423 --- src/SDCCglue.c | 8 ++++---- src/SDCCval.c | 2 +- support/Util/SDCCerr.c | 2 +- support/Util/SDCCerr.h | 2 +- 4 files changed, 7 insertions(+), 7 deletions(-) diff --git a/src/SDCCglue.c b/src/SDCCglue.c index 2b6cfa9f..7bb11bef 100644 --- a/src/SDCCglue.c +++ b/src/SDCCglue.c @@ -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); } diff --git a/src/SDCCval.c b/src/SDCCval.c index a7528c4a..e8613921 100644 --- a/src/SDCCval.c +++ b/src/SDCCval.c @@ -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; } diff --git a/support/Util/SDCCerr.c b/support/Util/SDCCerr.c index 5aac4a73..e8b25529 100644 --- a/support/Util/SDCCerr.c +++ b/support/Util/SDCCerr.c @@ -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 " }, diff --git a/support/Util/SDCCerr.h b/support/Util/SDCCerr.h index fcd04ea8..f56b728a 100644 --- a/support/Util/SDCCerr.h +++ b/support/Util/SDCCerr.h @@ -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 */ -- 2.39.5