-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA256 On 04/02/2014 07:37 AM, Aryeh Gregor wrote: > On Tue, Apr 1, 2014 at 5:56 PM, Zack Weinberg <za...@panix.com> > wrote: >> The downside of turning this on would be that any switch >> statements that *deliberately* include only a subset of the >> enumerators, plus a default case, would now have to be expanded >> to cover all the enumerators. > > If there are few enough that this is sane. There are at least a > few switches on nsresult in the tree, IIRC. Those would have to > be rewritten as if/else. I think we have some other big enums > lying around, although probably not so dramatic.
Given the numbers posted elsewhere, I think this is clearly not going anywhere until someone has time and working development machine to find out just how burdensome it is. I have no idea how long it will be before I personally can do such experiments, alas. > On Tue, Apr 1, 2014 at 10:13 PM, Karl Tomlinson <mozn...@karlt.net> > wrote: >> Does WARNINGS_AS_ERRORS make the default:MOZ_CRASH() >> unnecessary? > > No, because it's possible that the thing you're testing is not > actually a valid enum value, such as if it was incorrectly cast. > Our codebase has no shortage of dubious casts. Also, in many cases default:MOZ_CRASH() would kill control flow paths that make the compiler think variables might be used uninitialized. zw -----BEGIN PGP SIGNATURE----- Version: GnuPG v1 Comment: Using GnuPG with Icedove - http://www.enigmail.net/ iQIcBAEBCAAGBQJTPsnUAAoJEJH8wytnaapkyRgQALgWSAFa+FLLyYuFeuQis9zs KhqmNCYmCtTk9KNv8WhPTZCN6QYEekKPGKyoi5A+DXaRPqkqf6N2X3F8bWQbIrTB hZeRKm7Ks9TEvrBWQy8NwGV0Q2BftWpvvoKlHu44/Z8A1o8bW9X3kA/4GRltCi6+ jizXprEQ96opIOA2/7X7JdOG4jMnyNgeX236cgTQOIzf1RF2at70OGfVOZ+FcnPO UjctNx32L6xd306SIzWI/gwGXP7e9rxVl87/vjk+R8HcBoNNftkphRoZuP1L7h9E QNAAwdYUUa5TWrku9jeYIKgzI+gFTt2IjTsglIx3tHSlhB9Eigni6FzqYPjmUjQ+ sRn+726/cVDu8o9iKyZ3vTAxEYHHGFQVTLozlHp3zaVjqu02k6QvCZ4qkBJxU+0D zr3QZFg4WgN0FnS15b8HeeJKXfE1x8FQWsT7lVITlE7+kNq3DgHK7REpJvwxvGFX L6IdTY2Ag1V3ytywWgY8Qh1Tjvf73j+tMcO9Ka2auyGDJzwwem1BpfHJiCfQ4So4 SCJ/xH65p7Twgh7L//gIwMo2lhovP3/YTel5yVXSe5yIAzfoJ3mIMAKmF6vkcI55 ytD48TyNCxCCtEndc3QnsGA5EvRnM1tkAb01dfEVmrVmruFXoR6cTjJ3yiIgU3V3 OXTT6fwLxm/4bqUEwDcp =TW5u -----END PGP SIGNATURE----- _______________________________________________ dev-platform mailing list dev-platform@lists.mozilla.org https://lists.mozilla.org/listinfo/dev-platform