Newsgroups: comp.std.c Path: utzoo!telly!problem!druid!darcy From: darcy@druid.uucp (D'Arcy J.M. Cain) Subject: Re: comment style Message-ID: <1991Jan6.050844.6604@druid.uucp> Organization: D'Arcy Cain Consulting, West Hill, Ontario References: <1991Jan04.164355.15674@sco.COM> Date: Sun, 6 Jan 91 05:08:44 GMT In article <1991Jan04.164355.15674@sco.COM> Ron Irvine writes: > a = 100/*p /* calculate first factor */ > + 25/n; /* and second factor */ > >It is incredibly STUPID to have the start of comment token the same >as a LEGAL combination of other language tokens. >I have run this program on 4 different C compilers and none of them >even warned of a potential problem (nested comments). Then you didn't try Gnu C with the -Wall option: tst.c:10 warning: `/*' within comment Turbo C generated a warning as well but it was because p was assigned a value and then never used. That's a warning I wish gcc issued. -- D'Arcy J.M. Cain (darcy@druid) | D'Arcy Cain Consulting | There's no government West Hill, Ontario, Canada | like no government! +1 416 281 6094 |