HARRIS FLAME Re: SHORT vs. INT

Snoopy seifert at hammer.UUCP
Thu Sep 26 02:58:04 AEST 1985


In article <274 at ccivax.UUCP> rb at ccivax.UUCP (rex ballard) writes:

>A very good example of a case where short than "int" is when communicating
>binary information between two dissimilar processors.  If a 68000 compiler
>consideres int to be 16 bits, and a 68020 compiler treats it as 32 bits,
>packed structures had better be very specific.

I've got a very simple solution for this.  The prototype works.  When
I get it polished up to suitable professional standards I'll post it.
It's amasing how simple the solution actually is.  And thus even more
amasing that noone's done it yet.

>Perhaps it is time to considere standardizing the size of char, long, and
>short.  At least we should have some small "guarenteed size" of unit like
>type "byte", which could always be 8 bits unsigned (or signed- vote on it).

Have fun implementing your 8 bit bytes on machines like the CDC 6x00,
which store charactors in 6 bits.  (That's right, no lower case!  Yucko!)
Besides, there are going to be old compilers in use for a long time.

Snoopy
tektronix!hammer!seifert
tektronix!tekecs!doghouse.TEK!snoopy

"su" > "Permission Denied"



More information about the Comp.lang.c mailing list