| delorie.com/archives/browse.cgi | search |
| From: | tweety AT Torino DOT ALPcom DOT it (Jurgen Schwietering) |
| Newsgroups: | comp.os.msdos.djgpp |
| Subject: | Re: strange warning |
| Date: | 15 Dec 1996 21:01:40 GMT |
| Organization: | ALPcom - The Network Provider |
| Lines: | 23 |
| Distribution: | world |
| Message-ID: | <591ovk$1mv@galileo.polito.it> |
| References: | <58vhpj$ors AT nntp DOT novia DOT net> <1MJO0BAlpCtyEweT AT talula DOT demon DOT co DOT uk> |
| NNTP-Posting-Host: | monviso.alpcom.it |
| To: | djgpp AT delorie DOT com |
| DJ-Gateway: | from newsgroup comp.os.msdos.djgpp |
Shawn Hargreaves (Shawn AT talula DOT demon DOT co DOT uk) wrote:
: >static char *go_deep(void)
: >/*
: > * Mark an area deep in the stack
: > */
: >{
: >int i;
: >
: > return((char*) &i);
: >}
try this (should ignore the local var error):
static char *go_deep(void)
{
int i;
char *p; /* if you need another location just exchange the lines */
/* and put 'char *p;' before 'int i';
p = (char *)&i;
return p;
}
Jurgen
| webmaster | delorie software privacy |
| Copyright © 2019 by DJ Delorie | Updated Jul 2019 |