This is the mail archive of the
dwarf2@corp.sgi.com
mailing list for the dwarf2 project.
Re: Replicated Dwarf [was Re: location lists]
- To: jason at redhat dot com (Jason Merrill)
- Subject: Re: Replicated Dwarf [was Re: location lists]
- From: todd dot allen at ccur dot com (Todd Allen)
- Date: Wed, 21 Mar 2001 11:36:54 -0700 (MST)
- Cc: dwarf2 at corp dot sgi dot com (dwarf2)
- Reply-To: todd dot allen at ccur dot com (Todd Allen)
>
> > 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