This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: Ada policy
* Robert Dewar:
> Hmm .. http://www.opengroup.org/onlinepubs/009695399/basedefs/stdint.h.html
>
> seems to confirm my understanding, and actually that reference says it is
> an extension of the C99 definition. What you would want is the type
> int_least24_t, but that's not required to be defined. Am I
> misunderstanding here?
<stdint.h> is a huge improvement. If your code is portable, it can't
make a difference if you use int_least24_t or int_least32_t. In fact,
you could even substitute int32_t for int24_t, and the code would
still work as before. (The need for precise bit counts only arises if
you have certain overflow semantics, which you get only for unsigned
types in standard C.)
By the way, your example
| So for example, there is no equivalent of
|
| type R is range -2**23 .. 2**23-1;
|
| which you expect to map into 24 bits on a 24 bit machine, and 36 bits on
| a 36 bit machine.
seems to lack an R'Base. Otherwise, your comment about mapping is a
bit misleading.