Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 27 Jun 2000 15:53:27 -0700
From:      "Brian O'Shea" <boshea@ricochet.net>
To:        Alexander Langer <alex@big.endian.de>
Cc:        Dan Papasian <bugg@bugg.strangled.net>, Clive Lin <clive@CirX.ORG>, FreeBSD current <current@FreeBSD.ORG>
Subject:   Re: let badsect recog IFCHR in 5.0-C
Message-ID:  <20000627155327.P15683@beastie.localdomain>
In-Reply-To: <20000627181431.A15122@cichlids.cichlids.com>; from Alexander Langer on Tue, Jun 27, 2000 at 06:14:31PM %2B0200
References:  <20000627230456.A18587@cartier.cirx.org> <20000627173821.A98097@cichlids.cichlids.com> <20000627120855.A3798@moe.c705742-a.htfdw1.ct.home.com> <20000627181431.A15122@cichlids.cichlids.com>

next in thread | previous in thread | raw e-mail | index | archive | help
On Tue, Jun 27, 2000 at 06:14:31PM +0200, Alexander Langer wrote:
> Thus spake Dan Papasian (bugg@bugg.strangled.net):
> 
> > > > +	// un-needed.
> > > > +	// memcpy(name_dir_end + 1, name_dir_end, strlen(name_dir_end) + 1);
> > > > +	// *name_dir_end = 'r';
> > > Use /* */ comments or #if 0.
> > Actually, there was just a discussion on comp.lang.c about how
> > they aren't interchangable.  The 'un-needed' part will have
> > to be commented with /* */ because the preprocessor will
> > parse tokens before it evaluates conditionals.
> 
> Could you explain that paragraph? I really can't figure out what you
> try to say or what it has to do with my comment, respectively :)

Dan was just explaining that commenting a block of code out with

	/*
	printf("This style of comment\n");
	 */

... is not equivalent to preventing the compilation of a block of code
using the preprocessor #if directive

#if 0

	printf("Like this");

#endif

... because the preprocessor still parses tokens inside the
conditionally compiled block, even if the code inside won't be
compiled, where in the former case it does not (the preprocessor
strips all comments before parsing tokens).  It doesn't have anything
to do with what you were trying to explain.  It was just an interesting
comment on comments.

-brian

-- 
Brian O'Shea
boshea@ricochet.net


To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-current" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20000627155327.P15683>