Article View: net.lang.c
Article #9765Re: Order of evaluation and optimizing code
From: Henry Spencer
Date: Sun, 09 Nov 1986 10:17
Date: Sun, 09 Nov 1986 10:17
28 lines
2073 bytes
2073 bytes
> ...It does preserve compatibility in the
> sense that code that uses it will compiler on a compiler that doesn't know
> about it...but will the compiled code work? If the compiler does not
> realize the significance of the unary plus and doesn't maintain the specified
> order of evaluation, is the compiled code going to work? Probably not.
Not a problem, because it *won't* compile on a compiler that doesn't know
about it. Pre-X3J11 C does not have a unary plus operator!
> ...remember that Berkeley and other institutions have
> already taken it upon themselves to add things that aren't in the
> original K&R spec, such as structure assignment. Are you going to tell
> me that a compiler which allows structure assignment "isn't a C compiler"?
Sorry, you are mistaken about the history. Structure assignment came from
Dennis Ritchie & Co. at Bell Labs, the originators of C. If you doubt me,
find a V7 Unix manual and look at the one-page addendum to the C Reference
Manual. K&R slightly predates V7, and hence doesn't mention it. (For that
matter, V7 was not the last word on C evolution within Bell, as you will
see if you compare the V7 C manual with the SysV C manual: no, "void"
and "unsigned char" and such were *not* invented by Berkeley.)
There have actually been remarkably few non-standard additions to C by
compiler writers -- a considerable tribute to Dennis's skill at devising
a language that lets you do what you want.
--
Henry Spencer @ U of Toronto Zoology
{allegra,ihnp4,decvax,pyramid}!utzoo!henry
Technical Details
Message-ID:
<7307@utzoo.UUCP>Path:
arc1-ca.pugleaf.net!utzoo!henryReferences:
<167@houligan.UUCP>Show Full Headers
Complete Article Headers
Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Posting-Version: version B 2.10 5/3/83; site utzoo.UUCP Path: arc1-ca.pugleaf.net!utzoo!henry From: henry@utzoo.UUCP (Henry Spencer) Newsgroups: net.lang.c Subject: Re: Order of evaluation and optimizing code Message-ID: <7307@utzoo.UUCP> Date: Sun, 9-Nov-86 05:17:12 EST Article-I.D.: utzoo.7307 Posted: Sun Nov 9 05:17:12 1986 Date-Received: Sun, 9-Nov-86 05:17:12 EST References: <167@houligan.UUCP> Organization: U of Toronto Zoology Lines: 28