* tree-mudflap.c (mf_varname_tree): Fix thinko setting declname.
authorRichard Henderson <rth@redhat.com>
Tue, 4 Jan 2005 18:47:02 +0000 (10:47 -0800)
committerRichard Henderson <rth@gcc.gnu.org>
Tue, 4 Jan 2005 18:47:02 +0000 (10:47 -0800)
From-SVN: r92901

gcc/ChangeLog
gcc/tree-mudflap.c

index 14c2438..8cd20f8 100644 (file)
@@ -1,3 +1,7 @@
+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>
 
        PR middle-end/17767
index 9672c20..b704d04 100644 (file)
@@ -1,5 +1,5 @@
 /* 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>
    and Graydon Hoare <graydon@redhat.com>
 
@@ -161,7 +161,7 @@ mf_varname_tree (tree decl)
 
   /* Add <variable-declaration>, possibly demangled.  */
   {
-    const char *declname = "<unnamed variable>";
+    const char *declname = NULL;
 
     if (DECL_NAME (decl) != NULL)
       {
@@ -175,6 +175,8 @@ mf_varname_tree (tree decl)
        if (declname == NULL)
          declname = lang_hooks.decl_printable_name (decl, 3);
       }
+    if (declname == NULL)
+      declname = "<unnamed variable>";
 
     pp_string (buf, declname);
   }