This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: Minor C/C++ parser clean-up request
- From: Zack Weinberg <zack at codesourcery dot com>
- To: Roger Sayle <roger at eyesopen dot com>
- Cc: gcc at gcc dot gnu dot org
- Date: Sat, 31 May 2003 23:27:55 -0700
- Subject: Re: Minor C/C++ parser clean-up request
- References: <Pine.LNX.4.44.0305240640270.2950-100000@www.eyesopen.com>
Roger Sayle <roger@eyesopen.com> writes:
> If the parsers were tidied up such that statement trees were must
> be fully constructed before they are passed to "add_stmt", this
> routine could call "fold_stmt" itself, and allow it to do a much
> better task of maintaining DECL_NUM_STMTS. Indeed, if it knew
> nothing was going to change behind its back, it could use a better
> parameterized model of function size, estimating the number of
> instructions in the current function from the types of the
> folded statements being added.
>
>
> Might I propose a polite request that we try to move towards
> consistently building trees in a write-only bottom-up fashion.
I think this is a good idea. You should maybe talk to Neil Booth who
is looking at a C parser rewrite.
zw