3 ms·
Genuinely curious: do you know of any C implementations that do not use a stack for such cases? It seems so prevalent that locally-scoped variables are often r
by turtledragonfly 4y ago
Genuinely curious: do you know of any C implementations that do not use a stack for such cases?
It seems so prevalent that locally-scoped variables are often referred to as "stack variables" in casual conversation, but I'm curious of cases where it's not true...
- shadowofneptune 4y agoI was curious about this, and I found this passage in the 2007 draft of the C standard: > 6.5.2.2.11: Recursive function calls shall be permitted, both directly and indirectly through any chain of other functions. This either means using stack frames, or heap-allocating activation records and tying them together with references. Second is a much rarer approach.
- dcminter 4y agoDidn't sparc targetted C use register windows? Cursory searching didn't clarify much for me though.