This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c++/50011] [C++0x] warning: narrowing conversion of 'i' from 'short unsigned int' to 'int' inside { } [-Wnarrowing]
- From: "rguenth at gcc dot gnu.org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Mon, 8 Aug 2011 10:08:34 +0000
- Subject: [Bug c++/50011] [C++0x] warning: narrowing conversion of 'i' from 'short unsigned int' to 'int' inside { } [-Wnarrowing]
- Auto-submitted: auto-generated
- References: <bug-50011-4@http.gcc.gnu.org/bugzilla/>
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=50011
Richard Guenther <rguenth at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|UNCONFIRMED |NEW
Last reconfirmed| |2011.08.08 10:02:27
Ever Confirmed|0 |1
--- Comment #3 from Richard Guenther <rguenth at gcc dot gnu.org> 2011-08-08 10:02:27 UTC ---
+ if ((TYPE_PRECISION (type) < TYPE_PRECISION (ftype)
+ || TYPE_UNSIGNED (type) != TYPE_UNSIGNED (ftype))
looks wrong. I guess it should be
if ((TYPE_PRECISION (type) < TYPE_PRECISION (ftype)
|| (TYPE_PRECISION (type) == TYPE_PRECISION (ftype)
&& TYPE_UNSIGNED (type) != TYPE_UNSIGNED (ftype)))
instead.