The *ART* of Computer Programming
Gordon Burditt
gordon at sneaky.UUCP
Fri Mar 9 15:17:47 AEST 1990
>> >If a program is worth >writing it is worth writing well.
>> Have you never heard of a one-time program? Or were you not referring to
>> this kind of program? -- Darren
>
>There is nothing so long-lived as a useful one-shot program!!!
Ok, here's my definition of a one-time program:
A one-shot program is a short program that isn't supposed to be executed, and
either doesn't compile or compiles with bad code generation using some
compiler of interest. Its only function is to demonstrate a compiler bug.
Example (made up but something very close really happened):
main()
{
# ifndef NOBUG
register
# endif
unsigned int i = 4;
foo( i <<= i ); /* compiler error: no table entry for op REG */
}
/* nobody ever bothers to write foo() */
Gordon L. Burditt
sneaky.lonestar.org!gordon
More information about the Comp.unix.wizards
mailing list