Re: The semicolon habit

Paul_Long@ortel.org (Paul Long)
Wed, 17 May 1995 04:49:26 GMT

          From comp.compilers

Related articles
Re: The semicolon habit mark@omnifest.uwm.edu (1995-05-10)
Re: The semicolon habit salomon@silver.cs.umanitoba.ca (1995-05-11)
Re: The semicolon habit graham.matthews@maths.anu.edu.au (1995-05-15)
Re: The semicolon habit Paul_Long@ortel.org (1995-05-17)
| List of all articles for this month |

Newsgroups: comp.compilers
From: Paul_Long@ortel.org (Paul Long)
Keywords: syntax, design
Organization: Oregon Telcom
References: 95-05-102
Date: Wed, 17 May 1995 04:49:26 GMT

graham.matthews@maths.anu.edu.au writes:
>salomon@silver.cs.umanitoba.ca (Daniel J. Salomon) writes:
[snip]
>> while(x < 10.0);
>>and not notice the error. There is no syntax error here, but this
statement
>>is almost certainly a run-time error.
>
>To my mind this is a *semantic* rather than syntactic flaw in C.
[snip]
[Keep in mind that if x is volatile, that's a reasonable thing to write.
It's a subtle issue. -John]


We wrote a C compiler for a client's DSP chip. The sample code they gave us
had lots of these indefinite while loops. They looped on a volatile
memory-mapped I/O location until it, for example, went non-zero. They use
this idiom to synchronize with other components in their execution
environment.


Paul Long
plong@perf.com


--


Post a followup to this message

Return to the comp.compilers page.
Search the comp.compilers archives again.