Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Posting-Version: version B 2.10.1 6/24/83 (MC830713); site vu44.UUCP Path: utzoo!linus!decvax!ittvax!dcdwest!sdcsvax!sdcrdcf!hplabs!hao!seismo!mcvax!vu44!jack From: jack@vu44.UUCP Newsgroups: net.lang.c Subject: Re: Using &LABEL Message-ID: <383@vu44.UUCP> Date: Thu, 13-Sep-84 04:48:46 EDT Article-I.D.: vu44.383 Posted: Thu Sep 13 04:48:46 1984 Date-Received: Sun, 16-Sep-84 08:01:00 EDT References: <3480@decwrl.UUCP> Organization: VU Informatica, Amsterdam Lines: 35 [Bug Bug Bug, Bug is the word......] Well, never a dull moment when you play around with your C compiler. With the V7 compiler, the following piece of code not only compiles correctly, it even *works*. How long will it be before we get rid of fortrisms and the like??? ---------------------------------- #include main() { func(0); func(1); } func(arg) int arg; { int *jumptab[2]; goto endofit; /* cannot use &label before it's defined */ lab0: printf("Lab 0\n"); return; lab1: printf("Lab 1\n"); return; endofit: jumptab[0] = &lab0; jumptab[1] = &lab1; goto jumptab[arg]; } --------------------- Jack Jansen, {philabs|decvax}!mcvax!vu44!jack