3 ms·
Yes, I get the reserve space for local variables and so on. But this is a leaf-function and one that has no register trashing or temporary variables. Could thi
by Flow 9y ago
Yes, I get the reserve space for local variables and so on.
But this is a leaf-function and one that has no register trashing or temporary variables. Could this be inlined later on via link-time optimizations? Will the linker then remove that function prologue and epilogue?
- elgenie 9y agoYeah, it can certainly be inlined or optimized away with various compiler options. However, as you might surmise, debugging without stack frames becomes rather difficult as functions corresponding to source code disappear into a goo of assembly. The example with slightly different options (as mentioned in another comment) gives what you're looking for: https://godbolt.org/g/GlkEQK https://godbolt.org/g/GlkEQK
- pja 9y agogcc has the -fomit-leaf-frame-pointer option at least.