Path: utzoo!utgpu!jarvis.csri.toronto.edu!mailrus!cs.utexas.edu!uunet!virtech!cpcahil From: cpcahil@virtech.uucp (Conor P. Cahill) Newsgroups: comp.lang.c Subject: Re: This one bit me today Message-ID: <1989Nov9.133704.4002@virtech.uucp> Date: 9 Nov 89 13:37:04 GMT References: <2739@hub.UUCP> <1989Oct28.005308.11463@virtech.uucp> <336@cyan.UUCP> <136@csnz.co.nz> Organization: Virtual Technologies Inc. Lines: 26 In article <136@csnz.co.nz>, paul@csnz.co.nz (Paul Gillingwater) writes: > In article <11463@smoke.BRL.MIL> gwyn@brl.arpa (Doug Gwyn) writes: > >The most reasonable one was to add //-comment-to-end-of-line style > >comments. ... However, it was quite a bother > >when our //-ed code had to be compiled by a compiler that hadn't > >received this hack! > > sed -d ?^//? < foo.c > tmp.c ; cc tmp.c -o foo Just a few problems with this solution: 1. It's a pain in the *ss to change all the makefiles 2. Error messages from the cc tmp.c will point to the wrong line numbers 3. A source level debugger would require the tmp.c file to stay around which would require you the use a different name for each file. If you chose to add a letter to the begining (like Tfoo.c), you run the risk of making a file name that is too long for the system. -- +-----------------------------------------------------------------------+ | Conor P. Cahill uunet!virtech!cpcahil 703-430-9247 ! | Virtual Technologies Inc., P. O. Box 876, Sterling, VA 22170 | +-----------------------------------------------------------------------+