[C++ Patch] PR 44625

Jason Merrill jason@redhat.com
Thu Jun 23 16:01:00 GMT 2011


On 06/23/2011 11:30 AM, Paolo Carlini wrote:
>> Why are we creating a COMPONENT_REF with a null op1 in the first place?

> As a matter of fact, the possibility that DECL_NAME (field) could be
> null is considered in build_anon_union_vars itself, because right after
> the above mentioned build_min_nt call, there is a conditional 'if
> (DECL_NAME (field)) ...'

Indeed.  The code is using DECL_NAME in templates so that tsubst can 
look them up again by name, but as we see in this PR that can't work if 
the field has no name.  We need a different strategy for handling 
anonymous aggregates nested in other anonymous aggregates in templates.

Jason



More information about the Gcc-patches mailing list