access off end of array
Posted Mar 26, 2013 9:00 UTC (Tue) by
khim (subscriber, #9252)
In reply to:
access off end of array by tjc
Parent article:
Regehr: GCC 4.8 Breaks Broken SPEC 2006 Benchmarks
Actually, the ++/PDP-11 connection is urban legend -- see "More History", paragraph 2 at this link:
The Development of the C Language
Well, your own link shows that it's not an "urban legend" but more like oversimplification: This is historically impossible, since there was no PDP-11 when B was developed. The PDP-7, however, did have a few `auto-increment' memory cells, with the property that an indirect memory reference through them incremented the cell. This feature probably suggested such operators to Thompson; the generalization to make them both prefix and postfix was his own.
While factually incorrect (C design predates PDP-11) both "++" in C and
"(RX)+" in PDP-11's assembler come from the same source.
(
Log in to post comments)