From: kvigor Date: Tue, 30 Jan 2001 17:57:59 +0000 (+0000) Subject: force aggregate arguments to varargs functions to generic pointers as well. X-Git-Url: https://git.gag.com/?a=commitdiff_plain;h=5b7b1dedf7dc2bc430a23f82fb45b10bd29243eb;p=fw%2Fsdcc force aggregate arguments to varargs functions to generic pointers as well. git-svn-id: https://sdcc.svn.sourceforge.net/svnroot/sdcc/trunk/sdcc@548 4a8a32a2-be11-0410-ad9d-d568d2c75423 --- diff --git a/src/SDCCast.c b/src/SDCCast.c index 82574d72..7fd9cfca 100644 --- a/src/SDCCast.c +++ b/src/SDCCast.c @@ -593,10 +593,13 @@ int processParms (ast *func, value *defParm, { ast *newType = NULL; + printf("oogie "); + if (IS_CAST_OP(actParm) || (IS_AST_LIT_VALUE(actParm) && actParm->values.literalFromCast)) { /* Parameter was explicitly typecast; don't touch it. */ + printf("typecast.\n"); return 0; } @@ -613,6 +616,12 @@ int processParms (ast *func, value *defParm, DCL_TYPE(newType->opval.lnk) = GPOINTER; } + if (IS_AGGREGATE(actParm->ftype)) + { + newType = newAst_LINK(copyLinkChain(actParm->ftype)); + DCL_TYPE(newType->opval.lnk) = GPOINTER; + } + if (newType) { /* cast required; change this op to a cast. */ @@ -623,6 +632,12 @@ int processParms (ast *func, value *defParm, actParm->left = newType; actParm->right= parmCopy; decorateType(actParm); + + printf("boogie\n"); + } + else + { + printf("nada\n"); } return 0;