A goto jumps into a block past declarations that initialize variables

tx0/cpp:goto-into-blockstrictwarningreliability/control-flowdepth fastbug

What it finds

goto retry; to a label inside a block that the goto is not in: the jump enters the block past the declarations before the label, whose initializers do not run, so the variables hold indeterminate values.

Only a block entered from outside that declares a variable with an initializer before the label counts.

From the rule's source, goto_into_block.rs.

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:

tx0.toml
[rules]
"tx0/cpp:goto-into-block" = "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/cpp:goto-into-block] reason="..."

tx0 explain tx0/cpp:goto-into-block shows the same in the terminal. Found a false positive? Report it.