Ok, I am correct, but not FULLY correct. You will get a warning, not a compile error.
C++ code follows (because it uses better type correctness)
Code:
#include <iostream>
int main()
{
unsigned int a = 1;
int b = 1;
std::cout << (a == b);
return 0;
}
Code:
test2.c: In function ‘int main()’:
test2.c:8: warning: comparison between signed and unsigned integer expressions
This is the basic problem. is size_t signed or unsigned? Does functions that accept size_t types implement a maximum value? We don't know, so we just use size_t.