From: johanknol Date: Fri, 1 Mar 2002 10:44:11 +0000 (+0000) Subject: fixed bug #524211 X-Git-Url: https://git.gag.com/?a=commitdiff_plain;h=a69203dbfacc7a4e8f07ebedc17693aa49cb92f3;p=fw%2Fsdcc fixed bug #524211 git-svn-id: https://sdcc.svn.sourceforge.net/svnroot/sdcc/trunk/sdcc@1962 4a8a32a2-be11-0410-ad9d-d568d2c75423 --- diff --git a/src/SDCCglue.c b/src/SDCCglue.c index 9861c985..d74cfb61 100644 --- a/src/SDCCglue.c +++ b/src/SDCCglue.c @@ -970,8 +970,10 @@ printIvalPtr (symbol * sym, sym_link * type, initList * ilist, FILE * oFile) return; /* check the type */ - if (compareType (type, val->type) == 0) + if (compareType (type, val->type) == 0) { werror (W_INIT_WRONG); + printFromToType (type, val->type); + } /* if val is literal */ if (IS_LITERAL (val->etype)) @@ -1027,6 +1029,9 @@ printIval (symbol * sym, sym_link * type, initList * ilist, FILE * oFile) if (!ilist) return; + /* update line number for error msgs */ + lineno=sym->lineDef; + /* if structure then */ if (IS_STRUCT (type)) {