[Dwarf-Discuss] Questions about template/function parameter packs

Dodji Seketeli dodji at redhat.com
Fri Sep 11 13:33:11 PDT 2009


Hello,

On the one hand, in the proposal at
http://wiki.dwarfstd.org/index.php?title=C%2B%2B0x:_Variadic_templates
the DIEs of the arguments of a function parameter pack follow the
DW_TAG_formal_parameter_pack DIE of said function parameter pack.

On the other hand, the c++ core issue 818, US comment 45 states that a
function might have multiple parameter packs not necessarily located at the
end of the parameter list. Please note that each of the parameter packs
might have an empty set of arguments.

In the light of this, if we have:

<1>  DW_TAG_formal_parameter_pack
<2>  DW_TAG_formal_parameter

Is it that <2> is a pack argument of <1>, or is it that <1> has no pack
argument and then <2> is a normal parameter of the function ?

Couldn't this ambiguity argue in favour of pack arguments DIEs being
children of function parameter pack DIEs ? And if so, shouldn't we do the
same (for consistency) for template parameter packs as well ?

Thanks.

-- 
Dodji Seketeli
Red Hat, Inc.



More information about the Dwarf-Discuss mailing list