forked from OSchip/llvm-project
Silence -Wint-to-void-pointer-cast warning in test.
llvm-svn: 185756
This commit is contained in:
parent
c7332b2796
commit
5e00063b86
|
@ -16,6 +16,7 @@
|
||||||
#include <ios>
|
#include <ios>
|
||||||
#include <string>
|
#include <string>
|
||||||
#include <cassert>
|
#include <cassert>
|
||||||
|
#include <cstdint>
|
||||||
|
|
||||||
class test
|
class test
|
||||||
: public std::ios
|
: public std::ios
|
||||||
|
@ -31,12 +32,12 @@ int main()
|
||||||
{
|
{
|
||||||
test t;
|
test t;
|
||||||
std::ios_base& b = t;
|
std::ios_base& b = t;
|
||||||
for (int i = 0; i < 10000; ++i)
|
for (std::intptr_t i = 0; i < 10000; ++i)
|
||||||
{
|
{
|
||||||
assert(b.pword(i) == 0);
|
assert(b.pword(i) == 0);
|
||||||
b.pword(i) = (void*)i;
|
b.pword(i) = (void*)i;
|
||||||
assert(b.pword(i) == (void*)i);
|
assert(b.pword(i) == (void*)i);
|
||||||
for (int j = 0; j <= i; ++j)
|
for (std::intptr_t j = 0; j <= i; ++j)
|
||||||
assert(b.pword(j) == (void*)j);
|
assert(b.pword(j) == (void*)j);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue