From 752015004fca7a847d2b76d48dc5a96f5eba72ec Mon Sep 17 00:00:00 2001 From: johanknol Date: Sat, 27 Oct 2001 17:16:52 +0000 Subject: [PATCH] fixed a sprintf() bug, only visible in the ds390 port git-svn-id: https://sdcc.svn.sourceforge.net/svnroot/sdcc/trunk/sdcc@1452 4a8a32a2-be11-0410-ad9d-d568d2c75423 --- src/SDCCast.c | 2 +- src/SDCCmem.c | 1 + src/SDCCsymt.c | 6 ++++++ 3 files changed, 8 insertions(+), 1 deletion(-) diff --git a/src/SDCCast.c b/src/SDCCast.c index d8d961a1..a2663573 100644 --- a/src/SDCCast.c +++ b/src/SDCCast.c @@ -708,7 +708,7 @@ processParms (ast * func, } /* if defined parameters ended but actual has not & */ - /* stackAuto */ + /* reentrant */ if (!defParm && actParm && (options.stackAuto || IFFUNC_ISREENT (func->ftype))) return 0; diff --git a/src/SDCCmem.c b/src/SDCCmem.c index 883072ff..8b958506 100644 --- a/src/SDCCmem.c +++ b/src/SDCCmem.c @@ -370,6 +370,7 @@ allocGlobal (symbol * sym) { /* set the output class */ SPEC_OCLS (sym->etype) = port->mem.default_globl_map; + // jwk: we need to set SPEC_SCLS now !!!! /* generate the symbol */ allocIntoSeg (sym); return; diff --git a/src/SDCCsymt.c b/src/SDCCsymt.c index 27eb6191..e0a94215 100644 --- a/src/SDCCsymt.c +++ b/src/SDCCsymt.c @@ -1452,6 +1452,7 @@ compareType (sym_link * dest, sym_link * src) int res=compareType (dest, val->type); Safe_free(val->type); Safe_free(val); + //return res ? -1 : 0; return res; } if (IS_PTR (dest) && IS_FUNC (dest->next) && IS_FUNC (src)) @@ -1560,6 +1561,11 @@ aggregateToPointer (value * val) DCL_TYPE (val->type) = PPOINTER; break; case S_FIXED: + if (SPEC_OCLS(val->etype)) { + DCL_TYPE(val->type)=PTR_TYPE(SPEC_OCLS(val->etype)); + } + break; + if (TARGET_IS_DS390) { /* The AUTO and REGISTER classes should probably -- 2.39.5