I found some code today that confused me. It did something like this:
#include int main(int argc, char **argv) { int x = 5; int foo
The array foo is on the stack so how could it be expanded by x?
gcc simply moves the stack pointer:
subq %rax, %rsp
Link to full example with assembly output