Re: a question on basic types of interfaces.C



evangeli@xxxxxxx schrieb:
hello,
there are some points regarding Interfaces.C that I want to be sure of
if I consider Interfaces.C and <limits.h> are the following assertions
always valid :

Interfaces.C.int'first = INT_MIN
Interfaces.C.int'last = INT_MAX

Interfaces.C.short'first = SHRT_MIN
Interfaces.C.short'last = SHRT_MAX

Interfaces.C.int'size = sizeof(int) * CHAR_BIT

If you use compatible compilers: yes. I might be nitpicking but if you use a 64 bit GNAT-Ada and try to combine it with 16 bit Watcom-C then the assertions won't be true.

32 bit GNAT-Ada and 32 bit Watcom-C do actually work - sort of.

Check the documentation of your Ada compiler for a list a compatible C compiler :-).

Martin
.