Zack Weinberg writes: > This is a bit of a tangent, but: There are a whole bunch of places in > layout, and probably elsewhere, where we have the following catch-22: > if you have a switch statement over the values of an enumeration, gcc > and clang (with -Wall) will warn you about enumeration values that are > not handled, but only if there is no default: clause. In basically > all of the instances I know about, "default: MOZ_CRASH()" would be > appropriate, but has been omitted in the name of continuing to get > that warning (many of these enumerations do regularly get new values > added).
Does WARNINGS_AS_ERRORS make the default:MOZ_CRASH() unnecessary? My initial impression from cairo code, which uses -Wswitch-enum, is that it can be burdensome, so an optional solution, such as choosing whether to include the default clause, sounds appealing. _______________________________________________ dev-platform mailing list dev-platform@lists.mozilla.org https://lists.mozilla.org/listinfo/dev-platform