This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c++/45153] DWARF DW_AT_external flag set for undefined variables
- From: "roland at redhat dot com" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 13 Aug 2010 00:43:51 -0000
- Subject: [Bug c++/45153] DWARF DW_AT_external flag set for undefined variables
- References: <bug-45153-19509@http.gcc.gnu.org/bugzilla/>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
------- Comment #6 from roland at redhat dot com 2010-08-13 00:43 -------
DW_AT_external is correct for anything that has "global" linkage, whether or
not is defined. The absence of DW_AT_external, in a DIE that is not inside a
DW_TAG_subprogram scope, means that it has "file" linkage, like a "static"
variable in C/C++ does. A C++ static member has global linkage, not file
linkage.
DW_AT_declaration is used for any DIE that is for a non-defining declaration.
That is a separate axis of consideration than DW_AT_external, which only about
the linkage.
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=45153