title: Will compiler optimize out unused arguments of static function?
body: <p>I have a group of functions that are all declared <code>static</code> and <code>fastcall</code>. Most of them make use of a pointer to a struct that serves more or less the role of <code>this</code> in C++. Some of the functions don't need anything in the struct, but for uniformity sake I want to pass them the pointer anyway. Will the compiler notice that the argument is not used and omit allocating a register to it?</p>