[Bug c++/34397] [4.2/4.3/4.4 regression] ICE on invalid default template parameter

mmitchel at gcc dot gnu dot org gcc-bugzilla@gcc.gnu.org
Sun Feb 8 22:35:00 GMT 2009



------- 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



More information about the Gcc-bugs mailing list