diff options
author | rdivacky <rdivacky@FreeBSD.org> | 2009-12-01 11:08:04 +0000 |
---|---|---|
committer | rdivacky <rdivacky@FreeBSD.org> | 2009-12-01 11:08:04 +0000 |
commit | 4b08eb6308ca90a6c08e2fc79d100821b1b1f6aa (patch) | |
tree | 867cbbe32a66fd7d62dd9ce9df23a23fefdb8290 /test/SemaCXX/reinterpret-cast.cpp | |
parent | 6df2408694f81a03eb8b0e3b013272042233c061 (diff) | |
download | FreeBSD-src-4b08eb6308ca90a6c08e2fc79d100821b1b1f6aa.zip FreeBSD-src-4b08eb6308ca90a6c08e2fc79d100821b1b1f6aa.tar.gz |
Update clang to r90226.
Diffstat (limited to 'test/SemaCXX/reinterpret-cast.cpp')
-rw-r--r-- | test/SemaCXX/reinterpret-cast.cpp | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/test/SemaCXX/reinterpret-cast.cpp b/test/SemaCXX/reinterpret-cast.cpp index be960a3..bfe8887 100644 --- a/test/SemaCXX/reinterpret-cast.cpp +++ b/test/SemaCXX/reinterpret-cast.cpp @@ -1,5 +1,7 @@ // RUN: clang-cc -fsyntax-only -verify %s +#include <stdint.h> + enum test { testval = 1 }; struct structure { int m; }; typedef void (*fnptr)(); @@ -20,11 +22,11 @@ void self_conversion() void integral_conversion() { void *vp = reinterpret_cast<void*>(testval); - long l = reinterpret_cast<long>(vp); - (void)reinterpret_cast<float*>(l); - fnptr fnp = reinterpret_cast<fnptr>(l); + intptr_t i = reinterpret_cast<intptr_t>(vp); + (void)reinterpret_cast<float*>(i); + fnptr fnp = reinterpret_cast<fnptr>(i); (void)reinterpret_cast<char>(fnp); // expected-error {{cast from pointer to smaller type 'char' loses information}} - (void)reinterpret_cast<long>(fnp); + (void)reinterpret_cast<intptr_t>(fnp); } void pointer_conversion() |