Date: Fri, 23 Feb 1996 11:28:24 -0500 From: tucker@meadow.mdso.vf.mmc.com (Clark Tucker) To: ptroot@uswest.com Cc: questions@freebsd.org Subject: Re: cc in FreeBSD Message-ID: <9602231628.AA27764@calvin>
next in thread | raw e-mail | index | archive | help
> 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" <ptroot@uswest.com>
> Mime-Version: 1.0
> To: Christoph Kukulies <kuku@gilberto.physik.rwth-aachen.de>
> 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_
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?9602231628.AA27764>
