https://gcc.gnu.org/bugzilla/show_bug.cgi?id=61276
Bug ID: 61276
Summary: warn about possible coding errors with logical not (!)
Product: gcc
Version: 4.9.0
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: c++
Assignee: unassigned at gcc dot gnu.org
Reporter: manu at gcc dot gnu.org
CC: dcb314 at hotmail dot com
Depends on: 61271
+++ This bug was initially created as a clone of Bug #61271 +++
Clang detects this:
../../src/trunk/gcc/cgraphunit.c:1182:8: warning: logical not is only applied
to the left hand side of this comparison [-Wlogical-not-parentheses]
Source code is
&& (! TREE_CODE (target_node->decl) == FUNCTION_DECL
where
&& (TREE_CODE (target_node->decl) != FUNCTION_DECL)
was intended.
GCC should have this warning which would have detected several obvious bugs in
GCC itself.