
On Fri, Jan 4, 2013 at 2:37 AM, Stefan Seyfried <stefan.seyfried@googlemail.com> wrote:
Anyway, the function that generates the value for the switch statement can only return 3 different values, and all of those are handled in the switch. So the compiler *is* wrong in this case. Even if the code is ugly.
Compilers cannot possibly be expected to prove all properties of the code. That's been proven to be impossible. Sometimes code must conform to the compiler. Ugly code is usually especially confounding to compilers, since we perceive unnecessary complexity as ugliness, and that complexity is what confounds the compiler. So maybe this is one of those times, and rather than complain about the compiler, and requiring impossible things of it, adapting the code would be best (to either be less ugly, and more analyzable, or to add the unnecessary return statement). -- To unsubscribe, e-mail: opensuse-packaging+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse-packaging+owner@opensuse.org