Re: The annotated annotated annotated C standard part 3
- From: Walter Banks <walter@xxxxxxxxxxxxx>
- Date: Mon, 21 Jan 2008 18:25:06 -0500
"Clive D. W. Feather" wrote:
In article <aM-dnZzsy5HFZw7anZ2dnUVZ8tGqnZ2d@xxxxxx>, Richard Heathfield
<rjh@xxxxxxxxxxxxxxx> writes
Your writings have created a set of mis-usages and errors in their
turn. For example, we have people raving here that "sequence points
are compilers 101" when in fact they aren't,
If that term means what I think it is then, no, they aren't something
that a beginner compiler-writer might think of.
Here, I think I'd have to agree to differ. They seem to me to be a
perfectly natural way of thinking about compilation.
I'm happy to differ. I'd agree that there's a need to think about things
like "when do I need to flush registers?", but I think the C Standard
took this to a new stage beyond existing language documents.
There are several things at play. Sequence points in the C standard
identified one of the major issues of side-effect and parallel execution.
When you have two assignments to the same variable between
sequence points there are potentially undefined results. The C language
support for auto increment found in the PDP-11 and now many other
processors was an early taste of things to come for processors with
multiple execution streams. It is a testament to C that it can map
effectively onto some diverse architectures.
C was correct in not trying to force compilers to detect multiple writes
between sequence points. I think it was Richard who wrote a small
example whose detection would have been difficult in a compiler.
C is an implementation language, writing ambiguous statements should
produce undefined results. Craftsmen who use the language should
be clear in how they use the language.
Regards
--
Walter Banks
Byte Craft Limited
Tel. (519) 888-6911
Fax (519) 746 6751
http://www.bytecraft.com
walter@xxxxxxxxxxxxx
.
- References:
- The annotated annotated annotated C standard part 3
- From: spinoza1111
- Re: The annotated annotated annotated C standard part 3
- From: Clive D. W. Feather
- Re: The annotated annotated annotated C standard part 3
- From: spinoza1111
- Re: The annotated annotated annotated C standard part 3
- From: Clive D. W. Feather
- Re: The annotated annotated annotated C standard part 3
- From: Richard Heathfield
- Re: The annotated annotated annotated C standard part 3
- From: Clive D. W. Feather
- The annotated annotated annotated C standard part 3
- Prev by Date: Re: The annotated annotated annotated C standard
- Next by Date: Re: The annotated annotated annotated C standard
- Previous by thread: Re: The annotated annotated annotated C standard part 3
- Next by thread: Re: The annotated annotated annotated C standard part 3
- Index(es):
Relevant Pages
|