J
James Harris
My K&R 2nd ed has in the Reference Manual appendix, A7.4.8 sizeof yields
the number of BYTES required to store an object of the type of its operand.
What happens if C is running on a machine that addresses larger words only?
Shouldn't sizeof be defined to return the smallest number of 'storage
units' required to store an object of the type of its operand?
As a general point, is there a guide to what aspects of C would fail if run
on a machine which is not 8-bit byte addressed? IIRC the some of the Crays
define a char, an int and a long int all as 64-bit and some PICs use 12-bit
words.
I have a sneaking suspicion that C is so well defined (or, mature) that it
if used properly it would not run in to too much bother on these machines.
Any idea of where it would go wrong, if anywhere?
the number of BYTES required to store an object of the type of its operand.
What happens if C is running on a machine that addresses larger words only?
Shouldn't sizeof be defined to return the smallest number of 'storage
units' required to store an object of the type of its operand?
As a general point, is there a guide to what aspects of C would fail if run
on a machine which is not 8-bit byte addressed? IIRC the some of the Crays
define a char, an int and a long int all as 64-bit and some PICs use 12-bit
words.
I have a sneaking suspicion that C is so well defined (or, mature) that it
if used properly it would not run in to too much bother on these machines.
Any idea of where it would go wrong, if anywhere?