This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: cpplib: Improve traditional preprocessing
- From: Mark Mitchell <mark at codesourcery dot com>
- To: Neil Booth <neil at daikokuya dot demon dot co dot uk>, "gcc-patches at gcc dot gnu dot org" <gcc-patches at gcc dot gnu dot org>
- Date: Thu, 13 Jun 2002 14:16:29 -0700
- Subject: Re: cpplib: Improve traditional preprocessing
So the only real solution is to stop after a certain depth; I stop
if a function-like macro was first expanded at least 20 expansions
ago.
Bite the bullet and make this a tunable parameter. (No magic numbers!)
You may be able to steal some of the params.def stuff from GCC.
As a first step, you should at least put twenty in a global variable so
that it's clear what a subsequently-added command-line option should
change.
--
Mark Mitchell mark@codesourcery.com
CodeSourcery, LLC http://www.codesourcery.com