Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Posting-Version: version B 2.10 5/3/83; site umcp-cs.UUCP Path: utzoo!linus!philabs!seismo!rlgvax!cvl!umcp-cs!chris From: chris@umcp-cs.UUCP Newsgroups: net.lang.c Subject: Re: Is this legal C? Message-ID: <4011@umcp-cs.UUCP> Date: Tue, 22-Nov-83 19:19:29 EST Article-I.D.: umcp-cs.4011 Posted: Tue Nov 22 19:19:29 1983 Date-Received: Fri, 25-Nov-83 05:14:11 EST References: <2783@utcsrgv.UUCP> Organization: Univ. of Maryland, Computer Science Dept. Lines: 19 if (0) retry: printf ("foo\n"); ... goto retry; Looks like legal C to me, although I suspect that it's more likely to compile on every compiler if you put { } around the "retry: printf" part... (just because someone's compiler may interpret a label as a statement -- which it is not, but that makes no difference in most cases). In fact, the ability to write this kind of thing is one of the big gripes that some optimizer-people have with C. These people hate unrestricted gotos. (Admittedly the example is really a restricted goto and could be optimized.) -- In-Real-Life: Chris Torek, Univ of MD Comp Sci UUCP: {seismo,allegra,brl-bmd}!umcp-cs!chris CSNet: chris@umcp-cs ARPA: chris.umcp-cs@CSNet-Relay