[PATCHv3, resent] Add a warning for suspicious use of conditional expressions in boolean context

Andreas Schwab schwab@suse.de
Tue Sep 20 08:41:00 GMT 2016


In file included from ./tm.h:25:0,
                 from ../../gcc/target.h:52,
                 from ../../gcc/cp/typeck.c:30:
../../gcc/cp/typeck.c: In function 'tree_node* get_member_function_from_ptrfunc(tree_node**, tree, tsubst_flags_t)':
../../gcc/config/ia64/ia64.h:224:54: error: ?: using integer constants in boolean context [-Werror=int-in-bool-context]
 #define TARGET_VTABLE_USES_DESCRIPTORS (TARGET_ILP32 ? 4 : 2)
                                        ~~~~~~~~~~~~~~^~~~~~~~
../../gcc/cp/typeck.c:3441:11: note: in expansion of macro 'TARGET_VTABLE_USES_DESCRIPTORS'
       if (TARGET_VTABLE_USES_DESCRIPTORS)
           ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

Andreas.

-- 
Andreas Schwab, SUSE Labs, schwab@suse.de
GPG Key fingerprint = 0196 BAD8 1CE9 1970 F4BE  1748 E4D4 88E3 0EEA B9D7
"And now for something completely different."



More information about the Gcc-patches mailing list