Skip to content

Commit 9c8264f

Browse files
committed
[libcxxabi] [test] Don't cast a pointer to long, fixing the test on Windows
Use uintptr_t instead. On Windows, long is 32 bit even on 64 bit architectures. Differential Revision: https://reviews.llvm.org/D147639
1 parent ea47dcf commit 9c8264f

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

libcxxabi/test/catch_ptr_02.pass.cpp

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@
1717
// XFAIL: stdlib=apple-libc++ && target={{.+}}-apple-macosx10.9
1818

1919
#include <cassert>
20+
#include <stdint.h>
2021

2122
#if __cplusplus < 201103L
2223
#define DISABLE_NULLPTR_TESTS
@@ -136,7 +137,7 @@ void test7 ()
136137
assert(false);
137138
}
138139
catch (base2 *p) {
139-
assert ((unsigned long)p == 12+sizeof(base1));
140+
assert ((uintptr_t)p == 12+sizeof(base1));
140141
}
141142
catch (...)
142143
{

0 commit comments

Comments
 (0)