[PPL-devel] Re: Behaviors of `gcc -E -C'
Zack Weinberg
zack at codesourcery.com
Fri Oct 12 05:27:25 CEST 2001
On Mon, Oct 08, 2001 at 07:10:12PM +0100, Neil Booth wrote:
> There are various issues with -C which are not good. It saves
> comments within a macro expansion, so that each invocation reproduces
> the comment.
I don't remember why we tried to do this in the first place. Until
someone can remember why, turning them off again seems like a sensible
plan.
> These are fixable, if someone persuades me it's worth retaining the
> comments in macro expansions. We could convert C++ comments to C
> comments when saving them, and have directives call a new function
> _cpp_get_dtoken that filters out comment tokens.
All very doable.
I'd kind of like to see directives call a different function from
cpp_get_token, but for a different reason: right now profiling the
preprocessor is hindered by the gargantuan recursive cycle between all
the directive handlers (and their children) and cpp_get_token. If
there were an internal version that did do macro expansion but
didn't do directive processing, and they used it, the cycle would go
away.
zw
More information about the PPL-devel
mailing list