This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [patch] Fix PR c++/27572: ICE on typedef in parameter declaration
- From: Mark Mitchell <mark at codesourcery dot com>
- To: Volker Reichelt <reichelt at igpm dot rwth-aachen dot de>
- Cc: gcc-patches at gcc dot gnu dot org
- Date: Sun, 14 May 2006 14:16:41 -0700
- Subject: Re: [patch] Fix PR c++/27572: ICE on typedef in parameter declaration
- References: <tkrat.b9b45ede0aa23dd5@igpm.rwth-aachen.de>
Volker Reichelt wrote:
> The patch is mostly mechanical, as it replaces all uses of
> "declspecs->specs[(int)ds_typedef]" by "typedefp". The only interesting
> part is the third hunk where typedefp is reset for parameters.
Why not just return error_mark_node at that point?
> Btw, "typedefp" is now the sixth variable to track the status of
> declspecs locally in grokdeclarator. Wouldn't it make more sense in
> the long run to skip the "const" in "declspecs" and modify the
> original specs direcly?
IIRC, the point is that the same specifiers are reused for multiple
declarators, in something like "static const int i, *j;" and we want to
avoid modifying the behavior on the second declarator. You could indeed
make a copy of the specs in grokdeclarator, and use that.
--
Mark Mitchell
CodeSourcery
mark@codesourcery.com
(650) 331-3385 x713