Edwin Leuven <[EMAIL PROTECTED]> writes:
Angus> LOL! I think You are. You've confused this with "const &"

Edwin> and to add to the confusion (at least mine):
Edwin> why don't i see any invalid behavior or crashes
Edwin> with my original (wrong) patch?

The term is "undefined behaviour". Sometimes it works for you. Sometimes it
doesn't. Whether or not it works for you is no guarantee that it'll work for me.
The fact that it works for you means only that the memory containing the data
hasn't been overwritten by a subsequent operation. There's nothing to guarantee
that though...

Valgrind is pretty good at pointing out illegal operations on an x86 machine
running linux.

Static analysis tools like lint will flag up illegal constructs. Especially
simple, c-ish ones like this.

Angus




Reply via email to