Date: Mon, 19 Oct 2009 16:19:11 +0200 From: Erik Trulsson <ertr1013@student.uu.se> To: FreeBSD-Questions@FreeBSD.org Subject: Re: need C help, passing char buffer[] by-value.... Message-ID: <20091019141911.GA57854@owl.midgard.homeip.net> In-Reply-To: <20091019140322.GB35875@Grumpy.DynDNS.org> 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>
next in thread | previous in thread | raw e-mail | index | archive | help
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. -- <Insert your favourite quote here.> Erik Trulsson ertr1013@student.uu.se
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20091019141911.GA57854>