在下文中,我可以始终确保在通过testmacro
时x将被签名,因为我无法指定参数类型吗?
#include <stdio.h>
signed char testval;
#define testmacro(x) testval = x; printf("%i\n", testval)
int main() {
signed char inval;
inval = -32;
testmacro(inval);
inval = 32;
testmacro(inval);
return 0;
}