------- Comment #21 from mmitchel at gcc dot gnu dot org 2009-02-08 22:35 ------- Paolo --
My earlier suggestion to try grok_array_decl may indeed have been misguided. Some of the grok_* functions do more parser-style analysis than we want when processing templates. In theory, the way this ought to work is that we parse for a while, until we know what the user meant, and then call a function that actually generates code. When processing a template, we call that same underlying function after substitution. But, in practice, we may not always have organized things that tidily. In that case, the best fix is to factor out syntactic dismabiguation bits from grok_array_decl, and make a new underlying function that is called from both the parser and the template machinery. -- Mark -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=34397