[Bug c++/102726] New: Does not warn for enum constant in boolean context
rguenth at gcc dot gnu.org
gcc-bugzilla@gcc.gnu.org
Wed Oct 13 11:37:19 GMT 2021
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
More information about the Gcc-bugs
mailing list