Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Path: utzoo!linus!philabs!cmcl2!harvard!husc6!panda!genrad!mit-eddie!mit-trillian!henry From: henry@mit-trillian.MIT.EDU (Henry Mensch) Newsgroups: net.unix Subject: Re: Possible C Compiler Bug? Message-ID: <689@mit-trillian.MIT.EDU> Date: Tue, 10-Jun-86 12:14:03 EDT Article-I.D.: mit-tril.689 Posted: Tue Jun 10 12:14:03 1986 Date-Received: Sat, 14-Jun-86 03:58:14 EDT References: <6200004@wvlpdp> Reply-To: henry@ATHENA.MIT.EDU (Henry Mensch) Organization: The People's Republic of Cambridge Lines: 40 In article <6200004@wvlpdp> john@wvlpdp writes: > >This compiles: >main() >{ > A lot of code here; > goto here; > More code here; >here: > ; >} > >This will not: >main() >{ > A lot of code here; > goto here; > > >here: >} > > Is this a compiler bug? This is *not* a compiler bug -- Kernighan & Rtichie states that "Any statement may be preceded by label prefixes of the form identifier: which serve to declare the identifier as a label. . . ." The example that you show which does *not* compile does *not* have a statement after the label, and the label is misplaced. Your first example has a null statement after the label. This works fine, since there is indeed a statement after the label. -- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - Henry Mensch | Technical Writer | MIT/Project Athena henry@athena.mit.edu ..!mit-eddie!mit-athena!henry