summaryrefslogtreecommitdiffstats
path: root/gcc
diff options
context:
space:
mode:
Diffstat (limited to 'gcc')
-rw-r--r--gcc/cp/ChangeLog6
-rw-r--r--gcc/cp/tree.c10
2 files changed, 10 insertions, 6 deletions
diff --git a/gcc/cp/ChangeLog b/gcc/cp/ChangeLog
index 0effc4bc2a5..991a669d407 100644
--- a/gcc/cp/ChangeLog
+++ b/gcc/cp/ChangeLog
@@ -1,10 +1,14 @@
+2007-09-25 Jakub Jelinek <jakub@redhat.com>
+
+ * tree.c (cxx_printable_name): Compare FUNCTION_DECL uids
+ rather than pointers.
+
2007-09-24 Danny Smith <dannysmith@user.sourceforge.net>
PR c++/14688
* search.c (check_final_overrider): Fail if
targetm.comp_type_attributes returns 0.
-
2007-09-24 Jason Merrill <jason@redhat.com>
PR c++/33239
diff --git a/gcc/cp/tree.c b/gcc/cp/tree.c
index 77aac702f20..11181c2b425 100644
--- a/gcc/cp/tree.c
+++ b/gcc/cp/tree.c
@@ -1155,7 +1155,7 @@ build_overload (tree decl, tree chain)
const char *
cxx_printable_name (tree decl, int v)
{
- static tree decl_ring[PRINT_RING_SIZE];
+ static unsigned int uid_ring[PRINT_RING_SIZE];
static char *print_ring[PRINT_RING_SIZE];
static int ring_counter;
int i;
@@ -1168,7 +1168,7 @@ cxx_printable_name (tree decl, int v)
/* See if this print name is lying around. */
for (i = 0; i < PRINT_RING_SIZE; i++)
- if (decl_ring[i] == decl)
+ if (uid_ring[i] == DECL_UID (decl))
/* yes, so return it. */
return print_ring[i];
@@ -1177,18 +1177,18 @@ cxx_printable_name (tree decl, int v)
if (current_function_decl != NULL_TREE)
{
- if (decl_ring[ring_counter] == current_function_decl)
+ if (uid_ring[ring_counter] == DECL_UID (current_function_decl))
ring_counter += 1;
if (ring_counter == PRINT_RING_SIZE)
ring_counter = 0;
- gcc_assert (decl_ring[ring_counter] != current_function_decl);
+ gcc_assert (uid_ring[ring_counter] != DECL_UID (current_function_decl));
}
if (print_ring[ring_counter])
free (print_ring[ring_counter]);
print_ring[ring_counter] = xstrdup (lang_decl_name (decl, v));
- decl_ring[ring_counter] = decl;
+ uid_ring[ring_counter] = DECL_UID (decl);
return print_ring[ring_counter];
}
OpenPOWER on IntegriCloud