Re: Traditional cpp

看板FB_current作者時間12年前 (2013/04/27 12:33), 編輯推噓0(000)
留言0則, 0人參與, 最新討論串1/2 (看更多)
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. _______________________________________________ freebsd-current@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-current To unsubscribe, send any mail to "freebsd-current-unsubscribe@freebsd.org"
文章代碼(AID): #1HUrJzN0 (FB_current)
文章代碼(AID): #1HUrJzN0 (FB_current)