Mail Archives: cygwin/1998/07/25/00:01:28
---sjm wrote:
>
>
> Earnie Boyd writes:
> > Or why not set a new standard something like
> >
> > int8, int16, int32, int64 to indicate the number of bits.
>
> Right! The ambiguity of variable sizes has been the most unportable
feature of
> C. I know why they did it but it is still a pain. In those days the
world
> hadn't decided whether word sizes would be a multiple of 6 or 8 bits.
> Implementing a 32 bit data type on an 18 bit (or 24 bit) machine
would have
> been a disaster. Some machines would have wanted int6, int12, int18
and int24
> as bacic integer sizes. It was better to leave word sizes ambiguous
and accept
> the portability problem.
>
If the compiler were to recognize the number following the `int' as
the number of bits to be used then one could specify whatever they
wished. This would lend itself to `no problem' when porting assuming
the compiler could recognize this format.
BTW, IMHO, short should be the sizeof(int)/2 and long should be
sizeof(int)*2.
==
- \\||//
---o0O0--Earnie--0O0o----
--earnie_boyd AT yahoo DOT com--
------ooo0O--O0ooo-------
_________________________________________________________
DO YOU YAHOO!?
Get your free @yahoo.com address at http://mail.yahoo.com
-
For help on using this list (especially unsubscribing), send a message to
"gnu-win32-request AT cygnus DOT com" with one line of text: "help".
- Raw text -