This removes obsolete code in c-ada-spec.c that valgrind rightfully complains
about and should fix the PR in the process.
Tested on x86_64-linux-gnu, applied on the mainline and 4.9 branch.
2015-03-05 Eric Botcazou <ebotca...@adacore.com>
PR ada/65319
* c-ada-spec.c (print_destructor): Remove obsolete code.
--
Eric Botcazou
diff --git a/gcc/c-family/c-ada-spec.c b/gcc/c-family/c-ada-spec.c
index 007c176..9c633b5 100644
--- a/gcc/c-family/c-ada-spec.c
+++ b/gcc/c-family/c-ada-spec.c
@@ -2665,18 +2665,9 @@ static void
print_destructor (pretty_printer *buffer, tree t)
{
tree decl_name = DECL_NAME (DECL_ORIGIN (t));
- const char *s = IDENTIFIER_POINTER (decl_name);
- if (*s == '_')
- {
- for (s += 2; *s != ' '; s++)
- pp_character (buffer, *s);
- }
- else
- {
- pp_string (buffer, "Delete_");
- pp_ada_tree_identifier (buffer, decl_name, t, false);
- }
+ pp_string (buffer, "Delete_");
+ pp_ada_tree_identifier (buffer, decl_name, t, false);
}
/* Return the name of type T. */