This is the mail archive of the dwarf2@corp.sgi.com mailing list for the dwarf2 project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Re: Replicated Dwarf [was Re: location lists]


> 
> >    And because it isn't a defining declaration, giving it
> >    DW_AT_declaration also seems a good idea.
> 
> I disagree, because it has location attributes.
> 

   OK.

> >    But is some other indication that it's a local copy needed?  In Ada, I
> >    think not.  If we found an object in a function that had a
> >    DW_AT_specification referencing an object in some other scope, we'd know
> >    for sure that Something Was Up.  But in C, you can put an extern
> >    declaration in a function.  How would you tell the difference?
> 
> extern declarations in C don't refer to the defining DIE.
> 

   OK.

   One other thing, though: the local copy must not have a DW_AT_name.  If it
   did, it could interfere with proper visibility code.  The name might even
   end up creating ambiguities within the local scope.  It isn't a problem in
   a flat namespace, I suppose.  But it is a problem with hierarchical
   namespaces.  If you disagree, I'll cope up with some Ada examples.

-- 
Todd Allen
Concurrent Computer Corporation


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]