This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug c++/50011] [C++0x] warning: narrowing conversion of 'i' from 'short unsigned int' to 'int' inside { } [-Wnarrowing]


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.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]