[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: C programming langauge on Apple II
In article <1156219828.129049.151110@p79g2000cwp.googlegroups.com>,
PZ <skierpaul@yahoo.com> wrote:
> Eric Shepherd wrote:
>> On 2006-08-21 02:03:15 -0400, "PZ" <skierpaul@yahoo.com> said:
>>
>>> Likewise there is Hyper C, available via some of the FTP sites, but
>>> never having used it I can't comment other than to state its existence.
>>
>> I didn't mention Hyper C because I was only pointing out fully-featured
>> C implementations. Hyper C is a subset of C.
>
> When you say subset, you mean Non-ANSI, correct? Aztec wasn't 100%
> ANSI either, more K&R?
>
> - Paul
ANSI-C was created in 1989, but already in 1987 C compilers based on
the ANSI-C drafts were being released (the first one I saw was
Borland's then brand new Turbo C). But this was well after the
heydays of the Apple II, so all C compilers for the Apple II were
naturally based on K&R C.
Before 1989, no C compiler could be "100% ANSI", because before 1989
nobody knew what ANSI-C would be. True, drafts existed a few years before
1989, but some changes in the standard were made quite late. I particularly
remember the "noalias" keyword being removed from ANSI-C quite late.
The "noalias" keyword was a specifier, a little bit like "register",
a hint to the compiler: "register" hints the compiler that the variable
is heavily used and could preferably be allocated to a CPU register.
The "noalias" specifier would have hinted the compiler that there was
no alias for this variable (i.e. no other variable, pointer, etc,
referencing the same value), allowing compiler to do more agressive
optimization of the code with that assumption. However, "noalias" was
removed from the language because it was considered too unsafe (if
a variable was specified as "noalias" and then was aliased somewhere in
the code anyway, this could generate some very obscure bugs, almost
indistinguishable from a compiler bug).
--
----------------------------------------------------------------
Paul Schlyter, Grev Turegatan 40, SE-114 38 Stockholm, SWEDEN
e-mail: pausch at stockholm dot bostream dot se
WWW: http://stjarnhimlen.se/