summaryrefslogtreecommitdiff
path: root/gcc
diff options
context:
space:
mode:
authorktietz <ktietz@138bc75d-0d04-0410-961f-82ee72b054a4>2012-11-29 15:26:29 +0000
committerktietz <ktietz@138bc75d-0d04-0410-961f-82ee72b054a4>2012-11-29 15:26:29 +0000
commit332f269fb9482414ea960cd950bf11fe3ab3c7de (patch)
treedf2ca83669c3b263cca4afefe920e0f413e18894 /gcc
parent8d93a59425b43854fc8771ee51b0379f6217bbeb (diff)
downloadgcc-332f269fb9482414ea960cd950bf11fe3ab3c7de.tar.gz
PR target/53912
* class.c (dump_class_hierarchy_r): Cast from pointer via uintptr_t. (dump_vtable): Likewise. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@193934 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc')
-rw-r--r--gcc/cp/ChangeLog6
-rw-r--r--gcc/cp/class.c11
2 files changed, 12 insertions, 5 deletions
diff --git a/gcc/cp/ChangeLog b/gcc/cp/ChangeLog
index c202bdf5025..4f240e9f3b6 100644
--- a/gcc/cp/ChangeLog
+++ b/gcc/cp/ChangeLog
@@ -1,3 +1,9 @@
+2012-11-29 Kai Tietz <ktietz@redhat.com>
+
+ PR target/53912
+ * class.c (dump_class_hierarchy_r): Cast from pointer via uintptr_t.
+ (dump_vtable): Likewise.
+
2012-11-29 Ed Smith-Rowland <3dw4rd@verizon.net>
PR c++/52654
diff --git a/gcc/cp/class.c b/gcc/cp/class.c
index da511e2aad2..82b2c0a3810 100644
--- a/gcc/cp/class.c
+++ b/gcc/cp/class.c
@@ -7815,9 +7815,9 @@ dump_class_hierarchy_r (FILE *stream,
int i;
indented = maybe_indent_hierarchy (stream, indent, 0);
- fprintf (stream, "%s (0x%lx) ",
+ fprintf (stream, "%s (0x" HOST_WIDE_INT_PRINT_HEX ") ",
type_as_string (BINFO_TYPE (binfo), TFF_PLAIN_IDENTIFIER),
- (unsigned long) binfo);
+ (HOST_WIDE_INT) (uintptr_t) binfo);
if (binfo != igo)
{
fprintf (stream, "alternative-path\n");
@@ -7839,10 +7839,10 @@ dump_class_hierarchy_r (FILE *stream,
if (BINFO_PRIMARY_P (binfo))
{
indented = maybe_indent_hierarchy (stream, indent + 3, indented);
- fprintf (stream, " primary-for %s (0x%lx)",
+ fprintf (stream, " primary-for %s (0x" HOST_WIDE_INT_PRINT_HEX ")",
type_as_string (BINFO_TYPE (BINFO_INHERITANCE_CHAIN (binfo)),
TFF_PLAIN_IDENTIFIER),
- (unsigned long)BINFO_INHERITANCE_CHAIN (binfo));
+ (HOST_WIDE_INT) (uintptr_t) BINFO_INHERITANCE_CHAIN (binfo));
}
if (BINFO_LOST_PRIMARY_P (binfo))
{
@@ -7975,7 +7975,8 @@ dump_vtable (tree t, tree binfo, tree vtable)
if (ctor_vtbl_p)
{
if (!BINFO_VIRTUAL_P (binfo))
- fprintf (stream, " (0x%lx instance)", (unsigned long)binfo);
+ fprintf (stream, " (0x" HOST_WIDE_INT_PRINT_HEX " instance)",
+ (HOST_WIDE_INT) (uintptr_t) binfo);
fprintf (stream, " in %s", type_as_string (t, TFF_PLAIN_IDENTIFIER));
}
fprintf (stream, "\n");