O
Old Wolf
Chris said:He isn't, I've had the same requirement (maintaining two pieces of code,
one for C and the other for C++, is far more risky than having an
explicit cast where it isn't required). There are other exceptions:
When external coding standards require it.
When using a compiler which exercises its standard-given right to give
diagnostics about anything it feels like it, and company policy is to
release no code with warnings.
One compiler I use issues a warning if you do use a useless
cast (which you can't turn off without turning off other
useful warnings). I hope you don't have to maintain your code
on this compiler as well as the other ones you mention