A case label names a range with ..., an extension of GNU C
What it finds
case 'a' ... 'z': is a GNU extension that other compilers reject, and with spaces left out around ... it is read as a malformed number.
From the rule's source, case_range.rs.
int kind(int c){ switch (c) { case 'a' ... 'z':tx0 reports: this case range is an extension of GNU C return 1; default: return 0; }} Turn it on, off or suppress it
The rule runs from the strict tier up. To turn it on in a lower tier, give it a level in tx0.toml:
[rules]
"tx0/c:case-range" = "warning"To keep one finding, suppress it with a reason. tx0 suppress ID --reason "..." writes the comment on the line before the code:
// tx0: ignore[tx0/c:case-range] reason="..."tx0 explain tx0/c:case-range shows the same in the terminal. Found a false positive? Report it.