Always generate warning/error for assignment as truth value
Ching, Jimen (US SSA)
jimen.ching@baesystems.com
Wed May 2 21:11:00 GMT 2007
Hi,
I was wondering if there's an option to gcc/g++ to make it generate a
warning/error when an assignment is used as a truth value in an
expression.
The -Wall option does this. But it can be silenced with parentheses.
The problem is, macros often use parentheses around expressions. Thus,
this warning is silenced for macros.
Perhaps, in a macro, double parentheses are needed could solve this
problem.
--jc
--
BAE Systems NS I&S
810 Richards Street, Ste. 124
Honolulu, HI 96813
Phone: 808 441-2563
More information about the Gcc
mailing list