On 10 ???, 07:23, Le Chaud Lapin <jaibudu...@[EMAIL PROTECTED]
> wrote:
> Hi All,
>
> I would like to know of existing systems where CHAR_BIT of <climits>
> is not equal to 8. I am particular interested in prevalent systems.
>
> Technically, my code is mostly ****table, but only within a particular
> machine. Innter-machine interaction (serialization for example), there
> will be problems for those machines where CHAR_BIT != 8.
Likelihood depends on what you are targeting. But, to give a few
specific examples - some DSPs cannot operate on individual octets, so
char is whatever the word size of the architecture is - e.g. 32-bit.
There was a link to do***entation for a C++ compiler for such a
platform (SHARC) given earlier in a thread titled "mixed-sign
arithmetic and auto" (which I would recommend to read, by the way - it
has some more information somewhat relevant to the topic) - here it
is:
http://www.analog.com/UploadedFiles/Associated_Docs/75285036450_SHARC_cc_man.pdf
Apparently, this one has 32-bit char, and, as a consequence,
sizeof(int)==sizeof(char)==1
--
[ See http://www.gotw.ca/resources/clcm.htm
for info about ]
[ comp.lang.c++.moderated. First time posters: Do this! ]


|