The GCC documentation has a very clear example of stack reuse:
int *p; { int local1; p = &local1; local1 = 10; ... } // local1 lifetime is over, but p still points to local1 { int local2; local2 = 20; ... } // local2 might reuse local1 space if (*p == 10) // out of scope use of local1 { ... }
Thus, the option basically means that each local variable has a dedicated stack space. If the option is used (default), local variables with non-overlapping lifetimes can use the same stack space (as local1 and local2 in the example above.
This is only for local variables and time series, it has nothing to do with clearing the stack.
Clearing the stack always occurs after returning and regardless of the -fstack-reuse parameter. But due to the option, we may need to allocate (and clear after returning) more stack space for the same number of local variables.
source share