Visual Studio types

git-svn-id: svn+ssh://svn.cprover.org/srv/svn/cbmc/trunk@4401 6afb6bc1-c8e4-404c-8f48-9ae832c5b171
This commit is contained in:
kroening 2014-08-04 12:09:59 +00:00
parent 864dad9cfa
commit 5b6cc5892a
1 changed files with 8 additions and 3 deletions

View File

@ -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);
}