From: epetrich Date: Sat, 28 Aug 2004 05:48:48 +0000 (+0000) Subject: * src/SDCCsymt.c (processFuncArgs): make sure parameter types X-Git-Url: https://git.gag.com/?a=commitdiff_plain;h=9285d285e1dfed714124e134ca042e6744ea1650;p=fw%2Fsdcc * src/SDCCsymt.c (processFuncArgs): make sure parameter types are sane and complete before asking the port its prefered parameter passing method (fixes bug #1017633) * device/lib/hc08/_ret.c: added "data" storage class to _ret2 and _ret3 git-svn-id: https://sdcc.svn.sourceforge.net/svnroot/sdcc/trunk/sdcc@3455 4a8a32a2-be11-0410-ad9d-d568d2c75423 --- diff --git a/ChangeLog b/ChangeLog index 1a5db842..b3312311 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,11 @@ +2004-08-28 Erik Petrich + + * src/SDCCsymt.c (processFuncArgs): make sure parameter types + are sane and complete before asking the port its prefered parameter + passing method (fixes bug #1017633) + * device/lib/hc08/_ret.c: added "data" storage class to _ret2 + and _ret3 + 2004-08-27 Erik Petrich * src/hc08/gen.c (genPackBitsImmed, genUnpackBitsImmed): fix offset diff --git a/device/lib/hc08/_ret.c b/device/lib/hc08/_ret.c index 0abb592a..bdfbf40b 100644 --- a/device/lib/hc08/_ret.c +++ b/device/lib/hc08/_ret.c @@ -1,3 +1,3 @@ -unsigned char _ret2; -unsigned char _ret3; +data unsigned char _ret2; +data unsigned char _ret3; diff --git a/src/SDCCsymt.c b/src/SDCCsymt.c index fe717e90..6b856b43 100644 --- a/src/SDCCsymt.c +++ b/src/SDCCsymt.c @@ -2475,7 +2475,12 @@ processFuncArgs (symbol * func) /* change it to pointer to the same type */ while (val) { - int argreg = 0; + int argreg = 0; + char buffer[SDCC_NAME_MAX+1]; + + SNPRINTF (buffer, sizeof(buffer), "%s parameter %d", func->name, pNum); + checkTypeSanity (val->etype, buffer); + /* mark it as a register parameter if the function does not have VA_ARG and as port dictates */