This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c/17257] Some assignment operators do not trigger "assignment used as * truth value" warning
- From: "jsm at polyomino dot org dot uk" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 1 Sep 2004 00:32:32 -0000
- Subject: [Bug c/17257] Some assignment operators do not trigger "assignment used as * truth value" warning
- References: <20040901001242.17257.tlambert2@mindspring.com>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
------- Additional Comments From jsm at polyomino dot org dot uk 2004-09-01 00:32 -------
Subject: Re: Some assignment operators do not trigger "assignment
used as * truth value" warning
On Wed, 1 Sep 2004, tlambert2 at mindspring dot com wrote:
> Would making this a warning when assignment warnings were enabled
> typicaly result in a large number of additional warnings, or would it
> typically result in no additional warnings? I.e. would this be mostly
> harmful, or mostly harmless?
When a bug in the C++ implementation resulted in warnings for the other
assignment operators, it was quickly noticed, so I expect there would be
many additional warnings. Such cases as while (x >>= 1) seem to be
common.
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=17257