This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c++/40752] -Wconversion generates false warnings for operands not larger than target type
- From: "wessjunk at gmail dot com" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Sat, 05 May 2012 15:09:22 +0000
- Subject: [Bug c++/40752] -Wconversion generates false warnings for operands not larger than target type
- Auto-submitted: auto-generated
- References: <bug-40752-4@http.gcc.gnu.org/bugzilla/>
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=40752
Wes <wessjunk at gmail dot com> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |wessjunk at gmail dot com
--- Comment #22 from Wes <wessjunk at gmail dot com> 2012-05-05 15:09:22 UTC ---
I agree with David. My code has many instances of things like
a+=2
where a is a char and this makes -Wconversion useless to me.
It's too bad, since it would really be helpful as I am in the process of
changing some data types in the code.
If someone really thinks there should be a warning for this behavior, how about
adding a separate
-Wchar-arithmetic
warning which warns on all char arithmetic and see how much people use it.