At pt.c:2462
http://gcc.gnu.org/viewcvs/trunk/gcc/cp/pt.c?revision=148666&view=markup
there's:
switch (TREE_CODE (t))
{
case TEMPLATE_PARM_INDEX:
if (TEMPLATE_PARM_PARAMETER_PACK (t))
parameter_pack_p = true;
break;
In gdb, macro exp shows:
(gdb) macro exp TEMPLATE_PARM_PARAMETER_PACK(t)
expands to: (((__extension__ ({ __typeof (t) const __t = (t); if (((enum
tree_code) (__t)->base.code) != (TEMPLATE_PARM_INDEX)) tree_check_failed
(__t, __FILE__, __LINE__, __FUNCTION__, (TEMPLATE_PARM_INDEX), 0); __t;
}))->base.lang_flag_0))
which I don't understand because it seems to just recheck
that TREE_CODE is TEMPLATE_PARM_INDEX and if not issue an
error message(from tree_check_failed). Why is there this
redundant check for TREE_CODE(t)== TEMPLATE_PARM_INDEX?
The only useful thing it does is return t->base.lang_flag_0.
What am I missing?
TIA.
-Larry