In GCC C, is there a way to push/pop data to the C return stack?
I'm not talking about implementing my own stack (I know how to do that); I mean using the existing C return stack to explicitly push/pop parameters (within the same level of braces, of course).
For example, something like:
extern int bar;
void foo(void) {
PUSH(bar);
bar = 12;
doSomething(); // that depends on the value of bar
bar = POP(); // restore original value of bar
}
If there were any easy way to do this, I think it would be a cleaner alternative to using a local variable like "oldBar" explicitly.