News for hackers. Stuff that matters.
Re:Everything I wish I knew when learning C by pclmulqdq on Monday November 28, 2022 @11:02AM (#33775260)
I think the "automatic storage" terminology is technically correct. C can be used in places where there is no actual "stack" and these still need a mechanism for local variables, so they specify a different kind of automatic storage.

Everyone uses a stack now, though, even very exotic processors.

Re:Everything I wish I knew when learning C by Koshkin on Monday November 28, 2022 @11:22AM (#33775538)
You can easily have a stack without the special machine instructions (like push and pop) or the special stack pointer register. In fact, such special register is only useful in the absence of (a sufficient number of) general-purpose registers, which is characteristic to simpler architectures that have few registers (most of which, too, are specialized); IBM mainframes, for instance, never had the notion of the stack built into the architecture: to allocate a stack frame the program would simply subtract the entire frame's size from the current value in some register and then populate whatever pieces it needs there using the register as the base pointer.
Re:Everything I wish I knew when learning C by webstrand on Monday November 28, 2022 @11:58AM (#33776045)
In the standard it's "automatic storage duration" which is one of the three (or four in C11) classes of storage duration.