Commit bfee926b by Richard Henderson Committed by Richard Henderson

* tree-mudflap.c (mf_varname_tree): Fix thinko setting declname.

From-SVN: r92901
parent 21e5076a
2005-01-04 Richard Henderson <rth@redhat.com>
* tree-mudflap.c (mf_varname_tree): Fix thinko setting declname.
2005-01-04 Uros Bizjak <uros@kss-loka.si> 2005-01-04 Uros Bizjak <uros@kss-loka.si>
PR middle-end/17767 PR middle-end/17767
......
/* Mudflap: narrow-pointer bounds-checking by tree rewriting. /* Mudflap: narrow-pointer bounds-checking by tree rewriting.
Copyright (C) 2002, 2003, 2004 Free Software Foundation, Inc. Copyright (C) 2002, 2003, 2004, 2005 Free Software Foundation, Inc.
Contributed by Frank Ch. Eigler <fche@redhat.com> Contributed by Frank Ch. Eigler <fche@redhat.com>
and Graydon Hoare <graydon@redhat.com> and Graydon Hoare <graydon@redhat.com>
...@@ -161,7 +161,7 @@ mf_varname_tree (tree decl) ...@@ -161,7 +161,7 @@ mf_varname_tree (tree decl)
/* Add <variable-declaration>, possibly demangled. */ /* Add <variable-declaration>, possibly demangled. */
{ {
const char *declname = "<unnamed variable>"; const char *declname = NULL;
if (DECL_NAME (decl) != NULL) if (DECL_NAME (decl) != NULL)
{ {
...@@ -175,6 +175,8 @@ mf_varname_tree (tree decl) ...@@ -175,6 +175,8 @@ mf_varname_tree (tree decl)
if (declname == NULL) if (declname == NULL)
declname = lang_hooks.decl_printable_name (decl, 3); declname = lang_hooks.decl_printable_name (decl, 3);
} }
if (declname == NULL)
declname = "<unnamed variable>";
pp_string (buf, declname); pp_string (buf, declname);
} }
......
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