Date: Sun, 07 Jun 1998 15:53:11 +0100 From: Brian Somers <brian@Awfulhak.org> To: Mike Smith <mike@smith.net.au> Cc: hackers@FreeBSD.ORG Subject: Re: Irritating cpp feature Message-ID: <199806071453.PAA10140@awfulhak.org> In-Reply-To: Your message of "Sun, 07 Jun 1998 00:53:48 PDT." <199806070753.AAA04355@antipodes.cdrom.com>
next in thread | previous in thread | raw e-mail | index | archive | help
>
> I'm coming across an irritating cpp feature trying to port a large body
> of foreign code; namely:
>
>
> #if 0
> This is pointless text with one of ' in it.
> #endif
>
> Despite the #if-fing out, the quote is still parsed. Unfortunately,
> this conflicts with a substantial body of #if'd documentation, which
> contains (you guessed it) more comment delimiters.
>
> The code obviously builds OK on other gcc-wielding platforms; is there
> something funny about our preprocessor?
I've seen this before.... it caused me a lot of problems when I first
used (IRRC) version 2.7.*. I wrote a script to parse ~400000 lines
of code and change the ' to a ", rebuilt and the problem went away.
I thought it happened only for
// This code isn't here
Afterwards, I realised that I'd made a mistake in the script and
missed a load of should-be-offenders.... but they compiled correctly !
I never got 'round to figuring out what exactly was going on (I got
permanently side-tracked in a new job), but it wasn't easily
reproducible :-(
> --
> \\ Sometimes you're ahead, \\ Mike Smith
> \\ sometimes you're behind. \\ mike@smith.net.au
> \\ The race is long, and in the \\ msmith@freebsd.org
> \\ end it's only with yourself. \\ msmith@cdrom.com
--
Brian <brian@Awfulhak.org>, <brian@FreeBSD.org>, <brian@OpenBSD.org>
<http://www.Awfulhak.org>
Don't _EVER_ lose your sense of humour....
To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-hackers" in the body of the message
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?199806071453.PAA10140>
