Is there any way I can catch and warn about redundancies at compile time?
Such as
if (abc && abc)
or
if (def || def)
Ok, this isn't actually from an optimisation point of view - I'm thinking more along the lines of a mistake in code - so when the coder intended to write
if (abc && abc)
when actually they meant to write
if (abc && def)
The compiler is going to silently optimise away the mistake, whereas I actually want to know if I can get the compiler to warn me if that has happened, in case it's in there by mistake!