From 6ad5c5c699a299cbee80955092056dc676502858 Mon Sep 17 00:00:00 2001 From: johanknol Date: Sun, 16 Sep 2001 16:22:20 +0000 Subject: [PATCH] These restriction were too strict, I have to think this over again first git-svn-id: https://sdcc.svn.sourceforge.net/svnroot/sdcc/trunk/sdcc@1277 4a8a32a2-be11-0410-ad9d-d568d2c75423 --- src/SDCCast.c | 10 +++++++--- src/SDCCmem.c | 2 ++ 2 files changed, 9 insertions(+), 3 deletions(-) diff --git a/src/SDCCast.c b/src/SDCCast.c index 673aae61..c7a35385 100644 --- a/src/SDCCast.c +++ b/src/SDCCast.c @@ -744,16 +744,20 @@ processParms (ast * func, } } + /* the parameter type must be at least castable */ if (compareType (defParm->type, actParm->ftype) == 0) { castError++; } +#ifdef JWK20010916 if (!IS_SPEC(defParm->type) && !IS_SPEC(actParm->ftype)) { // now we have two pointers, check if they point to the same - sym_link *dtype=defParm->type->next, *atype=actParm->ftype->next; + sym_link *dtype=defParm->type, *atype=actParm->ftype; do { + dtype=dtype->next; + atype=atype->next; if ( (dtype->next && !atype->next) || (!dtype->next && atype->next) || @@ -768,6 +772,8 @@ processParms (ast * func, } } } +#endif + if (castError) { werror (W_INCOMPAT_CAST); fprintf (stderr, "type --> '"); @@ -778,8 +784,6 @@ processParms (ast * func, fprintf (stderr, "'\n"); } - - /* if the parameter is castable then add the cast */ if (compareType (defParm->type, actParm->ftype) < 0) { diff --git a/src/SDCCmem.c b/src/SDCCmem.c index 890f81ea..e5f13fa4 100644 --- a/src/SDCCmem.c +++ b/src/SDCCmem.c @@ -581,10 +581,12 @@ allocLocal (symbol * sym) /* this is automatic */ +#ifdef JWK20010916 if (!IS_SPEC(sym->type) && SPEC_OCLS(sym->etype)) { allocIntoSeg (sym); return; } +#endif /* if it to be placed on the stack */ if (options.stackAuto || reentrant) { -- 2.30.2