| delorie.com/archives/browse.cgi | search |
| From: | "A. Sinan Unur" <asu1 AT c-o-r-n-e-l-l DOT edu> |
| Newsgroups: | comp.os.msdos.djgpp |
| Subject: | Re: dynamic gotos possible with djgpp? |
| Date: | 21 Dec 2002 15:13:37 GMT |
| Organization: | Cornell University |
| Lines: | 35 |
| Sender: | asu1 AT cornell DOT invalid (on pool-141-149-208-142.syr.east.verizon.net) |
| Message-ID: | <Xns92EB68088B9B7asu1cornelledu@132.236.56.8> |
| References: | <au1u53$vdj$1 AT news DOT online DOT de> |
| NNTP-Posting-Host: | pool-141-149-208-142.syr.east.verizon.net |
| X-Trace: | news01.cit.cornell.edu 1040483617 26501 141.149.208.142 (21 Dec 2002 15:13:37 GMT) |
| X-Complaints-To: | usenet AT news01 DOT cit DOT cornell DOT edu |
| NNTP-Posting-Date: | 21 Dec 2002 15:13:37 GMT |
| User-Agent: | Xnews/5.04.25 |
| To: | djgpp AT delorie DOT com |
| DJ-Gateway: | from newsgroup comp.os.msdos.djgpp |
| Reply-To: | djgpp AT delorie DOT com |
"Lars O. Hansen" <lars DOT o DOT hansen AT gmx DOT de> wrote in
news:au1u53$vdj$1 AT news DOT online DOT de:
> void *x; /* or long *x as addresses are just integers (but may
> conflict with C type checking) */
>
> x=label1; /* label1 a label like a label for static gotos */
>
> goto x;
>
> possible?
info gcc "c extensions"
#include <stdio.h>
int main(void)
{
void *f = &&mylabel;
goto *f;
printf("hello\n");
mylabel:
return 0;
}
do consider using a switch before jumping into this, though. it is
nonstandard, and can easily get very messy.
--
A. Sinan Unur
asu1 AT c-o-r-n-e-l-l DOT edu
Remove dashes for address
Spam bait: mailto:uce AT ftc DOT gov
| webmaster | delorie software privacy |
| Copyright © 2019 by DJ Delorie | Updated Jul 2019 |