From: johanknol Date: Tue, 26 Feb 2002 09:07:23 +0000 (+0000) Subject: fixed bug #522534 X-Git-Url: https://git.gag.com/?a=commitdiff_plain;h=1198b16812410a7145722dc2263f5b1c9d6a476c;p=fw%2Fsdcc fixed bug #522534 git-svn-id: https://sdcc.svn.sourceforge.net/svnroot/sdcc/trunk/sdcc@1955 4a8a32a2-be11-0410-ad9d-d568d2c75423 --- diff --git a/src/SDCCast.c b/src/SDCCast.c index ea0a777a..e96afef1 100644 --- a/src/SDCCast.c +++ b/src/SDCCast.c @@ -2148,8 +2148,10 @@ decorateType (ast * tree) if (IS_FUNC (LTYPE (tree))) { - werror (E_ILLEGAL_ADDR, "address of function"); - goto errorTreeReturn; + // this ought to be ignored + return (tree->left); + //werror (E_ILLEGAL_ADDR, "address of function"); + //goto errorTreeReturn; } if (IS_LITERAL(LTYPE(tree))) diff --git a/src/SDCCglue.c b/src/SDCCglue.c index e8922ec8..9861c985 100644 --- a/src/SDCCglue.c +++ b/src/SDCCglue.c @@ -796,6 +796,11 @@ printIvalFuncPtr (sym_link * type, initList * ilist, FILE * oFile) val = list2val (ilist); + if (!val) { + // an error has been thrown allready + val=constVal("0"); + } + if (IS_LITERAL(val->etype)) { if (compareType(type,val->etype)==0) { werror (E_INCOMPAT_TYPES);