NH> Very clever, I'll try it... however wouldn't it be an error (after
NH> macro expansion) to write
NH> void rc_select_slave(HANDLE h, LPSTR r)
NH> {
NH> 0441:7798;
NH> "For whom the bell tolls";
NH> error_message(NULL, "not here");
NH> }
The macro expansion isn't the above, it is:
void rc_select_slave(HANDLE h, LPSTR r)
{
h;
r;
error_message(NULL, "not here");
}
NH> It seems to me that the compiler would croak on the first two lines of
NH> code.
Why? What is the difference between "h" and "GetHandle()" which returns a
HANDLE? None - the return value is still a HANDLE, and you're still ignoring
it.
The compiler won't choke - if it is non-optimizing, it will happily put h
onto the stack (and take it off again), and then put r onto the stack (r is
merely a pointer to a string, not the string itself) (and take it off again),
and then put NULL and a pointer to "not here" on the stack, and call
error_message. Whatever error_message returns will be taken off the stack.
Then it will return.
Of course, if it is optimizing, it will ignore the first two lines' generated
code, and merely stop complaining about unused parameters.
---
---------------
* Origin: Tanktalus' Tower BBS (1:250/102)
|