The -Wparentheses switch (as well as -Wall) doesn't catch logical assignments used as truth values. For example:
int i = 0; if (i |= 1) {}; if (i ^= 1) {}; if (i &= 1) {}; -- Summary: -Wparentheses doesn't catch all assignments used as truth value Product: gcc Version: 3.4.4 Status: UNCONFIRMED Severity: normal Priority: P2 Component: c AssignedTo: unassigned at gcc dot gnu dot org ReportedBy: glebius at FreeBSD dot org CC: gcc-bugs at gcc dot gnu dot org http://gcc.gnu.org/bugzilla/show_bug.cgi?id=23964