Hi,
I am new to programming in C, but (as a scientist) have a lot of programming experience in Fortran 95.
I am trying to figure out how to get the compiler to raise an error if a function is incorrectly called. For example, the following file compiles without a problem with both gcc and icc:
Yet there is clearly a mistake, as test() should be called with an integer, not a float. Are there any debugging flags that will allow incorrect calls like this to be identified?Code:void test(int a) {} int main(void) { float x; x = 1.; test(x); return 0; }