From: SourceForge.net <no...@so...> - 2003-10-02 04:30:53
|
Bugs item #524753, was opened at 2002-03-02 05:24 Message generated for change (Comment added) made by epetrich You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=100599&aid=524753&group_id=599 Category: z80 port >Group: fixed >Status: Closed >Resolution: Fixed Priority: 5 Submitted By: Felipe Massia Pereira (felmasper) >Assigned to: Erik Petrich (epetrich) Summary: returning vars from funcs Initial Comment: /* this results in returning the address of the variable instead of content -- (at least) for Z80 -- return value+0 solves*/ #include <stdio.h> int value = 1234; int getret() { return value; } int main(void) { printf("%d\n",getret()); } ---------------------------------------------------------------------- >Comment By: Erik Petrich (epetrich) Date: 2003-10-01 23:30 Message: Logged In: YES user_id=635249 Fixed in src/z80/gen.c 1.122 ---------------------------------------------------------------------- Comment By: Felipe Massia Pereira (felmasper) Date: 2002-03-02 05:30 Message: Logged In: YES user_id=387191 in fact, return value+1-1 solves ---------------------------------------------------------------------- You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=100599&aid=524753&group_id=599 |