From OpenTTCN
////////////////////////////////////////////////////////////////////////
// Memory layout profile: Windows, x32, x86, Visual C++ compiler
module C_types
{
type universal char c_char ( char ( 0,0,0,0 ) .. char ( 0,0,0,255) );
type integer c_short (-32768..32767)
with { variant "signedness=signed;length-in-bits=16;byte-order=little-endian" }
type integer c_int (-2147483648 .. 2147483647)
with { variant "signedness=signed;length-in-bits=32;byte-order=little-endian" }
type integer c_long (-2147483648 .. 2147483647)
with { variant "signedness=signed;length-in-bits=32;byte-order=little-endian" }
type integer c_signed_char (-128 .. 127)
with { variant "signedness=signed;length-in-bits=8;byte-order=little-endian" }
type integer c_unsigned_char (0 .. 255)
with { variant "signedness=unsigned;length-in-bits=8;byte-order=little-endian" }
type integer c_unsigned_short (0 .. 65535)
with { variant "signedness=unsigned;length-in-bits=16;byte-order=little-endian" }
type integer c_unsigned_int (0 .. 4294967295)
with { variant "signedness=unsigned;length-in-bits=32;byte-order=little-endian" }
type integer c_unsigned_long (0 .. 4294967295)
with { variant "signedness=unsigned;length-in-bits=32;byte-order=little-endian" }
type float c_float
with { variant "format=IEEE 754;precision=single" }
type float c_double
with { variant "format=IEEE 754;precision=double" }
type float c_long_double
with { variant "format=IEEE 754;precision=double" }
/****************************************************************************
The c_type_info type is a dummy type used to retrieve globally applicable
type encoding information like struct field alignment etc.
Format of the variant attribute
-------------------------------
alignment-rules:
- standard:
* A char (one byte) will be 1-byte aligned.
* A short (two bytes) will be 2-byte aligned.
* An int (four bytes) will be 4-byte aligned.
* A float (four bytes) will be 4-byte aligned.
* A double (eight bytes) will be 8-byte aligned on Windows
Structs and unions are padded in the end if necessary so that the next field
starts on the multiple of the largest alignment of the preceding struct members.
Structs inside structs are aligned on the multiple of the largest alignment
of their members.
****************************************************************************/
type boolean c_type_info
with { variant "alignment-rules=standard" }
}