------- 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