Path: utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!wuarchive!zaphod.mps.ohio-state.edu!swrinde!elroy.jpl.nasa.gov!zardoz.cpd.com!dhw68k!felix!asylvain@felix.UUCP From: asylvain@felix.UUCP (Alvin "the Chipmunk" Sylvain) Newsgroups: comp.lang.c Subject: Re: Do you trust the "indent" program? Message-ID: <155340@felix.UUCP> Date: 3 Jan 91 23:22:34 GMT References: <12184@sybase.sybase.com> <5970@stpstn.UUCP> <1991Jan1.151157.19442@ux1.cso.uiuc.edu> Sender: daemon@felix.UUCP Reply-To: asylvain@felix.UUCP (Alvin "the Chipmunk" Sylvain) Organization: Foundation for the Advancement of Chipmunks Lines: 46 In article <1991Jan1.151157.19442@ux1.cso.uiuc.edu> mcdonald@aries.scs.uiuc.edu (Doug McDonald) writes: [...] > In article <5970@stpstn.UUCP> lerman@stpstn.UUCP (Ken Lerman) writes: > > > >NO, I would not trust indent. > Then you are deluded. Indent is probably more trustworthy than your > C compiler. Well, it has less work to do ... other than that, who knows? [...] > >The one area of concern I'd have left is what is done with comments. > >In particular, some CPPs treat the zero length comment /**/ as a > >concatenation operator. > > Not if they are compiling the C language they don't. The string > /**/ MUST be replaced by a single white space. Period. All pertinent > references (K&R first edition, K&R second edition, and the actual > ANSI standard) all agree 100% on this. If you so-called C compiler > does something else, it is terminally broken. It may be standard, but there *are* C compilers which do this. And, of course, programmers who have taken advantage of the "feature". > >Make sure that the undent program does NOT > >treat this as white space. > > It MUST treat it as white space!!! Because that is what it is. I agree. However, when one is stuck with the task of making a piece of code work, s/he is usually not concerned with what the "correct" is supposed to be, except for the results generated by the application. Actually, anyone with code which makes extensive use of the "feature" should probably rewrite it anyway, especially if upgrading to a system or compiler where the "feature" (correctly) doesn't exist. But that's a decision to be made on a case-by-case basis, i.e., is it cheaper to rewrite the code, or find a kludge around the problem? (I know, nobody likes "kludges", but this is the real world and elegance must sometimes take a backseat to expediency. Ah, but that's a whole 'nother thread!) -- asylvain@felix.UUCP (Alvin "the Chipmunk" Sylvain) ========================= Opinions are Mine, Typos belong to /usr/ucb/vi "We're sorry, but the reality you have dialed is no longer in service. Please check the value of pi, or see your SysOp for assistance." UUCP: hplabs!felix!asylvain ============================================