[Bug c/17257] Some assignment operators do not trigger "assignment used as * truth value" warning
jsm at polyomino dot org dot uk
gcc-bugzilla@gcc.gnu.org
Wed Sep 1 00:17:00 GMT 2004
------- Additional Comments From jsm at polyomino dot org dot uk 2004-09-01 00:17 -------
Subject: Re: New: Some assignment operators do not trigger
"assignment used as * truth value" warning
On Wed, 1 Sep 2004, tlambert2 at mindspring dot com wrote:
> /*
> * Some assignment operators do not trigger "assignment used as
> * truth value" warning. This seems wrong. The following code,
> * when compiled with "-Wall" only causes the compiler to emit a
> * single warning, only for the direct assignment. The same effect
> * is present on Macintosh (gcc 3.3 PPC) and Linux x86 platforms.
> */
This is by design. The warning is specifically for potential confusion
between = and ==.
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=17257
More information about the Gcc-bugs
mailing list