The importance of showing ALL of the code in C

From: Eric J. Korpela <korpela_at_ssl.berkeley.edu>
Date: Wed Feb 6 16:50:03 2002

> On Wed, 6 Feb 2002, John Chris Wren wrote:
> > Perhaps I worded that poorly. I know that we vould index it by 666, if we
> > like, but it's liable to generate a runtime error (one a machine with a MMU,
> > at any rate. A non-MMU processor the effects might never show up. Or you
> > may tell the CP/M BIOS that your disk has 10 heads instead of 2).
>
> With, OR WITHOUT, an MMU, it is legal C code!
> int A[10];
> int N;
> . . .
> A[10] = 0;
> will NOT generate a runtime error.

This may or may not generate a runtime error. It may or may not cause
your computer to burst into flames. Do a google search on the term
"nasal demons". Upon encountering the above code, the compiler is allowed
to make demons fly out of your nose.

Eric
Received on Wed Feb 06 2002 - 16:50:03 GMT

This archive was generated by hypermail 2.3.0 : Fri Oct 10 2014 - 23:34:44 BST