From owner-freebsd-questions@FreeBSD.ORG Mon Oct 19 14:19:51 2009 Return-Path: Delivered-To: FreeBSD-Questions@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 64A7C1065694 for ; Mon, 19 Oct 2009 14:19:51 +0000 (UTC) (envelope-from erikt@midgard.homeip.net) Received: from ch-smtp03.sth.basefarm.net (ch-smtp03.sth.basefarm.net [80.76.149.214]) by mx1.freebsd.org (Postfix) with ESMTP id 01C058FC2D for ; Mon, 19 Oct 2009 14:19:50 +0000 (UTC) Received: from c83-255-48-78.bredband.comhem.se ([83.255.48.78]:65277 helo=falcon.midgard.homeip.net) by ch-smtp03.sth.basefarm.net with esmtp (Exim 4.68) (envelope-from ) id 1Mzt4t-0005vB-AL for FreeBSD-Questions@FreeBSD.org; Mon, 19 Oct 2009 16:19:17 +0200 Received: (qmail 91960 invoked from network); 19 Oct 2009 16:19:11 +0200 Received: from owl.midgard.homeip.net (10.1.5.7) by falcon.midgard.homeip.net with ESMTP; 19 Oct 2009 16:19:11 +0200 Received: (qmail 57868 invoked by uid 1001); 19 Oct 2009 16:19:11 +0200 Date: Mon, 19 Oct 2009 16:19:11 +0200 From: Erik Trulsson To: FreeBSD-Questions@FreeBSD.org Message-ID: <20091019141911.GA57854@owl.midgard.homeip.net> References: <20091019013337.GA9522@thought.org> <20091019040229.b4e11bbc.freebsd@edvax.de> <4ad871310910181916q655dec06k72b1e7577751751e@mail.gmail.com> <19163.56681.724615.44106@jerusalem.litteratus.org> <20091019140322.GB35875@Grumpy.DynDNS.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20091019140322.GB35875@Grumpy.DynDNS.org> User-Agent: Mutt/1.5.20 (2009-06-14) X-Originating-IP: 83.255.48.78 X-Scan-Result: No virus found in message 1Mzt4t-0005vB-AL. X-Scan-Signature: ch-smtp03.sth.basefarm.net 1Mzt4t-0005vB-AL 0db5d2be543e608af6c869b83d021a78 Cc: Subject: Re: need C help, passing char buffer[] by-value.... X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 19 Oct 2009 14:19:51 -0000 On Mon, Oct 19, 2009 at 09:03:22AM -0500, David Kelly wrote: > On Sun, Oct 18, 2009 at 11:30:49PM -0400, Robert Huff wrote: > > > > Glen Barber writes: > > > > > > "//" comments are recognized by both C and C++. > > > > How about "... are recognized by both C++ and more recent versions > > of C."? > > I think gcc++ and gcc use the same preprocessor? Comments are stripped > in the preprocessor. > > The only thing we can really say is that gcc accepts // as a comment. Is > becoming an accepted convention in other C's but I doubt one can > universally state that its accepted in all "recent versions". It is accepted in recent versions of C, but not necessarily by all C compilers, depending on which version of C they support. "//" comments were added to C in the 1999 revision of the C standard, and was already then a very common extension that was supported by many compilers. If gcc supports "//" comments or not depends on which mode it is running in. If you run it in strict C89 mode, then it will not support "//" comments, but if you run it in C99 mode (or as a C++ compiler), it will support them. -- Erik Trulsson ertr1013@student.uu.se