public inbox for gcc-prs@sourceware.org
help / color / mirror / Atom feed
* Re: c/10813: Stack bug for functions with return value and parameter pointer
@ 2003-05-16 9:00 ehrhardt
0 siblings, 0 replies; 3+ messages in thread
From: ehrhardt @ 2003-05-16 9:00 UTC (permalink / raw)
To: gcc-bugs, gcc-prs, nobody, powerstat
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
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: c/10813: Stack bug for functions with return value and parameter pointer
@ 2003-05-18 17:01 ehrhardt
0 siblings, 0 replies; 3+ messages in thread
From: ehrhardt @ 2003-05-18 17:01 UTC (permalink / raw)
To: gcc-bugs, gcc-prs, nobody, powerstat
Synopsis: Stack bug for functions with return value and parameter pointer
State-Changed-From-To: feedback->closed
State-Changed-By: cae
State-Changed-When: Sun May 18 17:01:44 2003
State-Changed-Why:
Turned out to be an error in the submitters code. Submitter agreed
in private conversation that this can be closed.
http://gcc.gnu.org/cgi-bin/gnatsweb.pl?cmd=view%20audit-trail&database=gcc&pr=10813
^ permalink raw reply [flat|nested] 3+ messages in thread
* c/10813: Stack bug for functions with return value and parameter pointer
@ 2003-05-16 4:16 powerstat
0 siblings, 0 replies; 3+ messages in thread
From: powerstat @ 2003-05-16 4:16 UTC (permalink / raw)
To: gcc-gnats
>Number: 10813
>Category: c
>Synopsis: Stack bug for functions with return value and parameter pointer
>Confidential: no
>Severity: critical
>Priority: medium
>Responsible: unassigned
>State: open
>Class: sw-bug
>Submitter-Id: net
>Arrival-Date: Fri May 16 04:16:01 UTC 2003
>Closed-Date:
>Last-Modified:
>Originator: powerstat@web.de
>Release: unknown-1.0
>Organization:
>Environment:
Windows 2000 with djgpp installation, gcc version 3.2.3
>Description:
The following (shortened) code:
#include <stdio.h>
unsigned short countFixDateInRange(unsigned short startday, unsigned short startmonth, long startyear, unsigned short endday, unsigned short endmonth, long endyear, unsigned short day, unsigned short month, long *const year)
{
*year = 2003;
return(0);
}
int main(void)
{
long year = -1;
unsigned short daycount = countFixDateInRange(startday,startmonth,startyear,endday,endmonth,endyear,1,5,&year);
printf("%hu\n",daycount);
printf("%ld\n",year);
}
this should output:
0
2003
but it shows me:
2003
2003
when I comment the "year" parameter out - the return value is correct. - Looks like a stack problem?
>How-To-Repeat:
>Fix:
>Release-Note:
>Audit-Trail:
>Unformatted:
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2003-05-18 17:01 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2003-05-16 9:00 c/10813: Stack bug for functions with return value and parameter pointer ehrhardt
-- strict thread matches above, loose matches on Subject: below --
2003-05-18 17:01 ehrhardt
2003-05-16 4:16 powerstat
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).