3 ms·
The first case will be detected by -Wconversion, however you have to enable it. For the second case, correct me if I'm wrong, but I think both float / int and
by blub 11y ago
The first case will be detected by -Wconversion, however you have to enable it.
For the second case, correct me if I'm wrong, but I think both float / int and int / float have a float result. In fact, pretty much all operations involving an int and a float will have a float result.