This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: Behaviors of `gcc -E -C'
- To: Neil Booth <neil at daikokuya dot demon dot co dot uk>
- Subject: Re: Behaviors of `gcc -E -C'
- From: Zack Weinberg <zack at codesourcery dot com>
- Date: Thu, 11 Oct 2001 20:27:25 -0700
- Cc: Roberto Bagnara <bagnara at cs dot unipr dot it>,Doxygen mailing list <doxygen-users at lists dot sourceforge dot net>,gccbugs <gcc-bugs at gcc dot gnu dot org>, ppl-devel at cs dot unipr dot it,gcc-patches at gcc dot gnu dot org
- References: <3BC164FE.47E72D70@cs.unipr.it> <20011008191012.B32030@daikokuya.demon.co.uk>
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