access off end of array
Posted Mar 26, 2013 0:34 UTC (Tue) by
tjc (subscriber, #137)
In reply to:
access off end of array by HelloWorld
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
I think i++ is fine from a syntax point of view, so long as it's a stand-along statement, where it produces the same code as i += 1. But I try to avoid embedding increment operators within expressions that produce easily overlooked side effects.
(
Log in to post comments)