[libcxx-commits] [PATCH] D147640: [libcxxabi] [test] Use the correct printf formats for printing pointers
Martin Storsjö via Phabricator via libcxx-commits
libcxx-commits at lists.llvm.org
Mon Apr 17 07:50:55 PDT 2023
This revision was landed with ongoing or failed builds.
This revision was automatically updated to reflect the committed changes.
Closed by commit rGc4a735d445fd: [libcxxabi] [test] Use the correct printf formats for printing pointers (authored by mstorsjo).
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D147640/new/
https://reviews.llvm.org/D147640
Files:
libcxxabi/test/test_fallback_malloc.pass.cpp
Index: libcxxabi/test/test_fallback_malloc.pass.cpp
===================================================================
--- libcxxabi/test/test_fallback_malloc.pass.cpp
+++ libcxxabi/test/test_fallback_malloc.pass.cpp
@@ -9,6 +9,7 @@
#include <cstdio>
#include <deque>
#include <cassert>
+#include <inttypes.h>
#include <__threading_support>
@@ -192,11 +193,11 @@
print_free_list ();
char *p = (char *) fallback_malloc ( 1024 ); // too big!
- std::printf("fallback_malloc ( 1024 ) --> %lu\n", (unsigned long ) p);
+ std::printf("fallback_malloc ( 1024 ) --> %" PRIuPTR"\n", (uintptr_t) p);
print_free_list ();
p = (char *) fallback_malloc ( 32 );
- std::printf("fallback_malloc ( 32 ) --> %lu\n", (unsigned long) (p - heap));
+ std::printf("fallback_malloc ( 32 ) --> %" PRIuPTR"\n", (uintptr_t) (p - heap));
if ( !is_fallback_ptr ( p ))
std::printf("### p is not a fallback pointer!!\n");
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D147640.514233.patch
Type: text/x-patch
Size: 953 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/libcxx-commits/attachments/20230417/e5523709/attachment.bin>
More information about the libcxx-commits
mailing list