I have following code:
#include <iostream>
char add(char a, int b)
{
return a + b;
}
int main(void)
{
long long a = 100000000;
long long b = 20;
int x = add(a, b);
std::cout << x << std::endl;
return 0;
}
And I dont understand why does my code compile without any warnings.
Shouldn’t the GCC compiler with the -Wall flag give me a type mismatch error?