c/10813: Stack bug for functions with return value and parameter pointer
Kai Hofmann
powerstat@web.de
Sun May 18 10:42:00 GMT 2003
ehrhardt@mathematik.uni-ulm.de, gcc-bugs@gcc.gnu.org, schrieb am 16.05.03 11:00:09:
>
> Synopsis: Stack bug for functions with return value and parameter pointer
>
> State-Changed-From-To: open->feedback
> State-Changed-By: cae
> State-Changed-When: Fri May 16 09:00:07 2003
> State-Changed-Why:
> Please submit a self-contained testcase that actually compiles and
> shows the wrong behaviour. Also: What are the exact command line
> options used to compile this and what is the output of gcc -v?
>
> http://gcc.gnu.org/cgi-bin/gnatsweb.pl?cmd=view%20audit-trail&database=gcc&pr=10813
Hallo,
ich kann meinen request im gnats leider nicht editieren und auch nichts hinzufügen - also auf diesem wege.
Muss mich leider entschuldigen das ganze war ein fehlalarm - das problem liegt eher in einer fehlenden warning des compilers:
int funcname(int a, int &b)
{
*b = 5000;
if (a > 5)
{
return(0);
}
}
da fehlt natürlich das return nach dem if - und dafür sollte ne warning da sein.
is a nun <=5 ist das return value auch gleich 5000.
gcc -c -O2
MfG
Kai Hofmann
______________________________________________________________________________
UNICEF bittet um Spenden fur die Kinder im Irak! Hier online an
UNICEF spenden: https://spenden.web.de/unicef/special/?mc=021101
More information about the Gcc-bugs
mailing list