I suspect your last code is an error. According to johnfound. The first code is that all C compilers should always follow the call to the _cdecl call, which in a function means (in Intel, unfortunately, I don't know the AT & T syntax):
Function Definition
_functionA: push rbp mov rbp, rsp ;Some function pop rbp ret
In the caller:
call _functionA sub esp, 0 ; Maybe if it zero, some compiler can strip it
Why does GCC always abide by the _cdecl calling convention if it does not follow that this is nonsense, that is, the compiler is no smarter than the pre-build programmer. Thus, it always follows _cdecl at all costs.
source share