From 65fefc9bf4cd3678ffda9fa389041a2f56f41769 Mon Sep 17 00:00:00 2001 From: johanknol Date: Sat, 24 Mar 2001 19:33:27 +0000 Subject: [PATCH] fixed a --stack-auto without --int-long-reent bug git-svn-id: https://sdcc.svn.sourceforge.net/svnroot/sdcc/trunk/sdcc@709 4a8a32a2-be11-0410-ad9d-d568d2c75423 --- src/SDCCsymt.c | 18 +++++++++++++----- 1 file changed, 13 insertions(+), 5 deletions(-) diff --git a/src/SDCCsymt.c b/src/SDCCsymt.c index 99bb8e5a..3cf7259d 100644 --- a/src/SDCCsymt.c +++ b/src/SDCCsymt.c @@ -1594,7 +1594,6 @@ processFuncArgs (symbol * func, int ignoreName) value *val; int pNum = 1; - /* if this function has variable argument list */ /* then make the function a reentrant one */ if (func->hasVargs) @@ -1639,10 +1638,19 @@ processFuncArgs (symbol * func, int ignoreName) pNum++; } - /* if this function is reentrant or */ - /* automatics r 2b stacked then nothing */ - if (IS_RENT (func->etype) || options.stackAuto) - return; + /* if this is an internal generated function call */ + if (func->cdef) { + /* ignore --stack-auto for this one, we don't know how it is compiled */ + /* simply trust on --int-long-reent or --float-reent */ + if (IS_RENT(func->etype)) { + return; + } + } else { + /* if this function is reentrant or */ + /* automatics r 2b stacked then nothing */ + if (IS_RENT (func->etype) || options.stackAuto) + return; + } val = func->args; pNum = 1; -- 2.39.5