Commit 97b6d55b by Matt Austern Committed by Matt Austern

re PR debug/14079 (wrong debug info for extern boolean variable in debug mode)

PR debug/14079
* name-lookup.c (add_decl_to_level): Add extern variables, as well as static, to static_decls array.

From-SVN: r79122
parent 23bd99da
2004-03-08 Matt Austern <austern@apple.com>
PR debug/14079
* name-lookup.c (add_decl_to_level): Add extern variables, as well
as static, to static_decls array.
2004-03-05 Jason Merrill <jason@redhat.com> 2004-03-05 Jason Merrill <jason@redhat.com>
* tree.c (list_hash_pieces): s/TYPE_HASH/TREE_HASH/. * tree.c (list_hash_pieces): s/TYPE_HASH/TREE_HASH/.
......
...@@ -526,9 +526,13 @@ add_decl_to_level (tree decl, cxx_scope *b) ...@@ -526,9 +526,13 @@ add_decl_to_level (tree decl, cxx_scope *b)
b->names = decl; b->names = decl;
b->names_size++; b->names_size++;
/* If appropriate, add decl to separate list of statics. */ /* If appropriate, add decl to separate list of statics. We
include extern variables because they might turn out to be
static later. It's OK for this list to contain a few false
positives. */
if (b->kind == sk_namespace) if (b->kind == sk_namespace)
if ((TREE_CODE (decl) == VAR_DECL && TREE_STATIC (decl)) if ((TREE_CODE (decl) == VAR_DECL
&& (TREE_STATIC (decl) || DECL_EXTERNAL (decl)))
|| (TREE_CODE (decl) == FUNCTION_DECL || (TREE_CODE (decl) == FUNCTION_DECL
&& (!TREE_PUBLIC (decl) || DECL_DECLARED_INLINE_P (decl)))) && (!TREE_PUBLIC (decl) || DECL_DECLARED_INLINE_P (decl))))
VARRAY_PUSH_TREE (b->static_decls, decl); VARRAY_PUSH_TREE (b->static_decls, decl);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment