Date: Sat, 10 Nov 2012 12:49:39 +0100 From: Dimitry Andric <dim@FreeBSD.org> To: Greg 'groggy' Lehey <grog@FreeBSD.org> Cc: Koop Mast <kwm@FreeBSD.org>, freebsd-current@freebsd.org, Niclas Zeising <zeising@FreeBSD.org> Subject: Re: Traditional cpp Message-ID: <509E3F53.4060609@FreeBSD.org> In-Reply-To: <20121110064621.GA10902@eureka.lemis.com> References: <201211090658.qA96whII081757@pozo.com> <20121109072631.GQ77848@eureka.lemis.com> <509CFC88.7050606@FreeBSD.org> <20121110064621.GA10902@eureka.lemis.com>
next in thread | previous in thread | raw e-mail | index | archive | help
On 2012-11-10 07:46, Greg 'groggy' Lehey wrote: > On Friday, 9 November 2012 at 13:52:24 +0100, Dimitry Andric wrote: ... >> Looks like yet another cpp -traditional abuse. > Use or abuse? Abuse, definitely. :-) A "C Preprocessor" is clearly meant to preprocess C, not arbitrary text files. You can see the problem of this approach, when you try to use another traditional preprocessor, like ports/devel/ucpp, for tools like Imake. Niclas Zeising can probably tell some interesting stories about this. Any subtly different spacing, token parsing behaviour, etc. tend to break those tools. They are basically relying on the specifics of the GNU cpp implementation. > In any case, it's not the only one. In the Good Old > Days people did things like that. So, it seems, does imake, and I'm > sure others will come out of the woodwork. > >> Clang will most likely never support traditional preprocessing. > > OK. > >> It is probably better to just use sed or awk for this kind of >> trickery. > > I'm not sure that's the way to go. It's more work than it's worth. > > What we really need is a traditional cpp. That's not difficult: > there's one in 4.3BSD (all 32 kB of source). OpenBSD also had one, > though it's gone now, so presumably that one has a clean license. > Both appear to be from pcc. Should we import it into the tree as, > say, tradcpp? Please check with Niclas and the other ports guys who have been wrestling with exactly this issue for some time. They may have lots of good suggestions.
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?509E3F53.4060609>