From 5b6cc5892a47dc2b50bdfecca06eb8b65122e74e Mon Sep 17 00:00:00 2001 From: kroening Date: Mon, 4 Aug 2014 12:09:59 +0000 Subject: [PATCH] Visual Studio types git-svn-id: svn+ssh://svn.cprover.org/srv/svn/cbmc/trunk@4401 6afb6bc1-c8e4-404c-8f48-9ae832c5b171 --- regression/cbmc/Visual_Studio_Types1/main.c | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/regression/cbmc/Visual_Studio_Types1/main.c b/regression/cbmc/Visual_Studio_Types1/main.c index 27784ccd2a..138a7b7cb1 100644 --- a/regression/cbmc/Visual_Studio_Types1/main.c +++ b/regression/cbmc/Visual_Studio_Types1/main.c @@ -1,6 +1,7 @@ int main() { - // these types are MS-specific + // these types are Visual Studio-specific + #ifdef _MSC_VER __int8 i1; __int16 i2; __int32 i3; @@ -10,6 +11,7 @@ int main() assert(sizeof(i2)==2); assert(sizeof(i3)==4); assert(sizeof(i4)==8); + #endif // general types @@ -25,19 +27,22 @@ int main() assert(sizeof(l)==4); assert(sizeof(ll)==8); - // these constants are MS-specific + // these constants are Visual Studio-specific + #ifdef _MSC_VER assert(sizeof(1i8)==1); assert(sizeof(1i16)==2); assert(sizeof(1i32)==4); assert(sizeof(1i64)==8); assert(sizeof(1i128)==16); - // oh, and these pointer qualifiers are MS-specific + // oh, and these pointer qualifiers are Visual Studio-specific int * __ptr32 p32; //int * __ptr64 p64; // requires --i386-win32 to work assert(sizeof(p32)==4); //assert(sizeof(p64)==8); + #endif + assert(sizeof(void *)==4); }