https://gcc.gnu.org/bugzilla/show_bug.cgi?id=102726
Bug ID: 102726
Summary: Does not warn for enum constant in boolean context
Product: gcc
Version: 12.0
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: c++
Assignee: unassigned at gcc dot gnu.org
Reporter: rguenth at gcc dot gnu.org
Target Milestone: ---
We fail to warn for
gsi_replace (&gsi, call, GSI_SAME_STMT);
with
extern bool gsi_replace (gimple_stmt_iterator *, gimple *, bool);
and
enum gsi_iterator_update
{
GSI_NEW_STMT, /* Move the iterator to the first statement added. */
GSI_SAME_STMT, /* Leave the iterator at the same statement. */
GSI_CONTINUE_LINKING /* Move iterator to whatever position is suitable
for linking other statements in the same
direction. */
};
presumably because GSI_SAME_STMT is 1