--- - branch: MAIN date: Fri Mar 5 16:31:49 UTC 2021 files: - new: '1.6' old: '1.5' path: src/tests/usr.bin/xlint/lint1/msg_130.c pathrev: src/tests/usr.bin/xlint/lint1/msg_130.c@1.6 type: modified id: 20210305T163149Z.b4f00b7d8c36b496fefba318eee36613cc0eff80 log: "tests/lint: add test for incompatible enums in switch\n\nNeither lint nor GCC 10 nor Clang 8 have a warning for an enum type\nmismatch in a switch statement.\n\nGCC 10 issues a warning but completely misses the point of the\nmismatched enum types. \ It only warns because in this test, EVENING has\nthe numeric value 3, which is out of bounds for enum color, where the\nvalid range is from 0 to 2. It says:\n\n> msg_130.c:45:2: warning:\n> case value â\x80\x983â\x80\x99 not in enumerated type â\x80\x98enum colorâ\x80\x99 [-Wswitch]\n\nClang 8 behaves almost the same, it just doesn't mention the value of\nthe constant, saying merely 'case value not in enumerated type'.\n" module: src subject: 'CVS commit: src/tests/usr.bin/xlint/lint1' unixtime: '1614961909' user: rillig