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

Dodji Seketeli dodji@redhat.com
Fri Sep 11 20:33:11 GMT 2009


On the one hand, in the proposal at
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 ?


Dodji Seketeli
Red Hat, Inc.

More information about the Dwarf-discuss mailing list