Re: [cc65] why this doesn't work?

From: Oliver Schmidt <>
Date: 2010-06-08 09:11:18
Hi Steve,

>> Any code that makes an assumption about the signedness of
>> plain char is non portable.

> Ah yes, that's got to be the most absurd thing about a language known for its
> portability.  As a programmer, you can't even count on the size your
> variables.
> (Nothing against any particular implementation of a C compiler, of
> course.)  I guess
> this refers more to int and long, etc., but it's all in the same vein.

From my perspective it's just the opposite way. Imagine all those
'int's used for some simple loop being for ever tied to let's say 16
bit - what they were in quite some implementations when C came up.
Depending on the CPU architecure a compiler would need to insert loads
of bit masking statements into the code just to have the native 32 or
64 bit entities behave like 16 bit.

If you for some reason really need to know about the size of your
variables you're free to use the types from stdint.h.

To unsubscribe from the list send mail to with
the string "unsubscribe cc65" in the body(!) of the mail.
Received on Tue, 8 Jun 2010 09:11:18 +0200

This archive was generated by hypermail 2.1.8 : 2010-06-08 09:11:31 CEST