From a69203dbfacc7a4e8f07ebedc17693aa49cb92f3 Mon Sep 17 00:00:00 2001 From: johanknol Date: Fri, 1 Mar 2002 10:44:11 +0000 Subject: [PATCH] fixed bug #524211 git-svn-id: https://sdcc.svn.sourceforge.net/svnroot/sdcc/trunk/sdcc@1962 4a8a32a2-be11-0410-ad9d-d568d2c75423 --- src/SDCCglue.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) 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)) { -- 2.47.2