
December 31st, 2010, 02:32 AM
|
 |
Contributing User
|
|
Join Date: Aug 2003
Location: UK
|
|
|
The address returned is a location on the stack, although the behaviour undefined, if you take the value immediately after the call, you are likely to get the expected value, however any subsequent function call is likely to be overwritten since the stack space will be reused.
I stress likely because compiler optimisations may affect the actual result. It is just bad and dangerous practice.
|