|
What development environment are you talking about dude ?
Anyway, i may have been incorrect - not completely, but a bit:
A compiler can allocate variables to the stack or to a register (if it's only used locally) - that is the compilers choice.
I am used to programming in an environment where memory is expensive (not so true now but where physical size is an issue (ie cell phones) its still holds) and efficient code is paramount - embedded software or thereabouts. Anyway, i wouldn't really be very happy if a compiler decided to put a temp variable on the stack - thats what registers are for. HOWEVER, i have no experience in other environments - so your words may be correct for your circumstances.
Just be careful - "All variables created in C are created on the stack". It's nothing to do with C - its to do with the compiler.
As i said before, sorry for hogging your thread and sorry for not providing an answer to your original question.
|