Emitted C draws warnings, or fails, in a few shapes #69
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
The C sexc writes is valid in all these shapes but one; but it draws warnings from
-Wall, or reads less clearly than it could:case/fallthroughemits no annotation, so clang's-Wimplicit-fallthroughfires on exactly the fallthrough that was asked for:C23 has
[[fallthrough]];; gcc and clang take__attribute__((fallthrough));before that.Operators of different precedence are written without the parentheses
-Wparenthesesasks for, though C reads them right:A local
[* const char]with no initializer declaresconst char * x[];, which C refuses: an array of unknown size needs an initializer, except as a parameter or anextern.(fn () void)is writtenvoid (*cb)(). Before C23,()declares a function of unspecified parameters, not of none;(void)says none.Cosmetic, for reading
-Coutput:staticfunction's body is indented 11 columns;#linedirectives carry trailing spaces;constbefore an aggregate written in place,(* const (struct ((c int)))), indents the aggregate's body to whereconstpushed its first line.Found with sexc 35604ad, probing corner cases the test suite does not cover; the rest of what that turned up is fixed on
more-tests-and-corner-cases.