diff options
author | Richard Henderson <rth@redhat.com> | 2005-01-04 10:47:02 -0800 |
---|---|---|
committer | Richard Henderson <rth@gcc.gnu.org> | 2005-01-04 10:47:02 -0800 |
commit | bfee926bd1769316f4ece85ba2d519b903d76e54 (patch) | |
tree | 29d4f7266f8f9fc508ec9720d3ccdcef23bb3d6c /gcc/tree-mudflap.c | |
parent | 21e5076a0b103569103829459be6457c3c39e39d (diff) | |
download | gcc-bfee926bd1769316f4ece85ba2d519b903d76e54.zip gcc-bfee926bd1769316f4ece85ba2d519b903d76e54.tar.gz gcc-bfee926bd1769316f4ece85ba2d519b903d76e54.tar.bz2 |
* tree-mudflap.c (mf_varname_tree): Fix thinko setting declname.
From-SVN: r92901
Diffstat (limited to 'gcc/tree-mudflap.c')
-rw-r--r-- | gcc/tree-mudflap.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/gcc/tree-mudflap.c b/gcc/tree-mudflap.c index 9672c20..b704d04 100644 --- a/gcc/tree-mudflap.c +++ b/gcc/tree-mudflap.c @@ -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); } |