Non-ANSI & Embedded C - Re: Structured Fortran - was Re: Self modifying code

Toby Thain toby at
Thu Sep 24 11:59:59 CDT 2015

On 2015-09-24 12:06 PM, Fred Cisin wrote:
> On Wed, 23 Sep 2015, Eric Smith wrote:
>> And the length of a char?  It's required that all types other than
>> bitfields be fully represented as multiple chars, not e.g. an int
>> being two and a half chars, and a char has to cover at least the range
>> 0..255, or -128..127, and it has to have a range based on a power of
>> two.
>> ...
> The original "challenge" just said "C".
> THAT is all ANSI C.
> K&R C did not have those limitations.  If you wanted to build a C with a
> 7 bit short, a 13 bit int, and a 19 bit long, it was OK.
> Only limits were that the sizeof an int couldn't be smaller than the
> size of a short, sizeof a long couldn't be less than that of an int, etc.
> I am not claiming that I could create a C compiler for 1401/1410, but
> these restrictions only preclude ANSI C.
> Note: I am also not saying that doing so would be a good idea.

We don't have to reach back into the past for examples, either: Embedded 
processors often have unabashedly non-ANSI C compilers with "unusual" 
features and built-in types. One that I've used is Microchip PIC C.


More information about the cctalk mailing list