From owner-freebsd-questions Fri Feb 23 08:29:16 1996 Return-Path: owner-questions Received: (from root@localhost) by freefall.freebsd.org (8.7.3/8.7.3) id IAA18922 for questions-outgoing; Fri, 23 Feb 1996 08:29:16 -0800 (PST) Received: from dekalb.vf.mmc.com (dekalb.vf.mmc.com [192.35.35.21]) by freefall.freebsd.org (8.7.3/8.7.3) with ESMTP id IAA18915 for ; Fri, 23 Feb 1996 08:29:10 -0800 (PST) Received: from franklin.vf.mmc.com (franklin.VF.GE.COM [166.17.5.51]) by dekalb.vf.mmc.com (8.7.3/8.7.3) with ESMTP id LAA13886; Fri, 23 Feb 1996 11:28:56 -0500 (EST) Received: from calvin (calvin.meadow.mdso.vf.ge.com [166.17.136.26]) by franklin.vf.mmc.com (8.7.3/8.7.3) with SMTP id LAA23431; Fri, 23 Feb 1996 11:28:55 -0500 (EST) Received: by calvin (5.x/SMI-SVR4) id AA27764; Fri, 23 Feb 1996 11:28:24 -0500 Date: Fri, 23 Feb 1996 11:28:24 -0500 From: tucker@meadow.mdso.vf.mmc.com (Clark Tucker) Message-Id: <9602231628.AA27764@calvin> To: ptroot@uswest.com Subject: Re: cc in FreeBSD Cc: questions@freebsd.org X-Sun-Charset: US-ASCII Sender: owner-questions@freebsd.org Precedence: bulk > From owner-freebsd-questions@freefall.freebsd.org Fri Feb 23 10:02:59 1996 > Date: Fri, 23 Feb 1996 07:52:59 -0600 > From: "Paul T. Root" > Mime-Version: 1.0 > To: Christoph Kukulies > Cc: wsantee@wsantee.oz.net, wollman@lcs.mit.edu, questions@freebsd.org > Subject: Re: cc in FreeBSD > Content-Transfer-Encoding: 7bit > > Christoph Kukulies wrote: > > > > > > > > > > > > > Garrett A. Wollman sez: > > > > > > > > > > > Not sure if this question is apropos for the Questions list, but is > > > > > > there a switch in the cc for FreeBSD (gcc 2.6.3, looks like) that > > > > > > allows C++-style comments in a C source file? > > > > > > > > > > Nope. Try this: > > > > > > > > > > perl -spi.bak -e 's,//(.*)$,/*$1 */,' *.c > > > > > > You script will fail on this: > > > > > > main(){ double a=3.//* this is a comment*/4.;printf("%f",a);} > I think this code will produce an error in any C++ compiler. (It does under Sun's SC3.0 CC ...) I believe I read in a a Stroustrup book (Design and Implementation of C++) that this was considered a potential problem but was not addressed in the syntax due to the fact that such a case was rare and confusing anyways. (my $0.02) > I don't think I'd want a program working for me that put out > stuff like this. > > > > or this one: > > > > /* ////////// */ > > Ok, this could happen, but is unlikely. > > -- > Paul T. Root - USWEST !NTERPRISE Networking Service ptroot@uswest.com > > "Maybe he can find a way to boost this network's sagging ratings. I > know, I know, we could work on our shows and make them better, but > that takes so much time and money!" > -- Stan Lansing _Murphy Brown_