Re: specifications (was Re: Languages: The Bigger the Uglier)

pardo@cs.washington.edu (David Keppel)
22 Mar 1996 00:43:57 -0500

          From comp.compilers

Related articles
[2 earlier articles]
Re: specifications (was Re: Languages: The Bigger the Uglier) dave@occl-cam.demon.co.uk (Dave Lloyd) (1996-03-14)
Re: specifications (was Re: Languages: The Bigger the Uglier) bobduff@world.std.com (1996-03-16)
Re: specifications (was Re: Languages: The Bigger the Uglier) jejones@microware.com (1996-03-16)
Re: specifications (was Re: Languages: The Bigger the Uglier) hbaker@netcom.com (1996-03-17)
Re: specifications (was Re: Languages: The Bigger the Uglier) jgj@ssd.hcsc.com (1996-03-20)
Re: specifications (was Re: Languages: The Bigger the Uglier) bobduff@world.std.com (1996-03-22)
Re: specifications (was Re: Languages: The Bigger the Uglier) pardo@cs.washington.edu (1996-03-22)
Re: specifications (was Re: Languages: The Bigger the Uglier) jgj@ssd.hcsc.com (1996-03-22)
Re: specifications (was Re: Languages: The Bigger the Uglier) hbaker@netcom.com (1996-03-23)
Re: specifications (was Re: Languages: The Bigger the Uglier) bobduff@world.std.com (1996-03-24)
Re: specifications (was Re: Languages: The Bigger the Uglier) bobduff@world.std.com (1996-03-24)
Re: specifications (was Re: Languages: The Bigger the Uglier) jgj@ssd.hcsc.com (1996-03-25)
Re: specifications (was Re: Languages: The Bigger the Uglier) ok@cs.rmit.edu.au (1996-03-27)
[3 later articles]
| List of all articles for this month |

From: pardo@cs.washington.edu (David Keppel)
Newsgroups: comp.compilers
Date: 22 Mar 1996 00:43:57 -0500
Organization: Computer Science & Engineering, U of Washington, Seattle
References: 96-03-096 96-03-112 96-03-123
Keywords: standards

jgj@ssd.hcsc.com (Jeff Jackson) writes:
>[Standards should be an implementation, so it is never ambiguous
> what is the intended implementation.]


There is at least one issue here:


      Some parts of the specification of languages are meant to be
      ambiguous. (We have debated here the lunacy of doing so; it
      stands that some specifications are menat to be ambiguous.)
      It is thus necessary to ensure the standard implementation
      can immplement each ambiguous construct at least two ways
      and that users of the standard exercise both implementations.


This is not necessarily a technical difficulty, but it needs to be
kept in mind.


As a historical footnote, the following is legal C partly because
"the Compiler accepted it":


switch (n & 3) {
do {
case 3: *dst = *src++;
case 2: *dst = *src++;
case 1: *dst = *src++;
case 0: *dst = *src++;
} while ((n -= 4) > 0);
}


It's called "Duff's device" after Tom Duff, the inventor
(discoverer?); it implements an unrolled "copy to device register"
loop.


;-D on ( Gone loopy ) Pardo
--


Post a followup to this message

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