[Bug c/49626] Explicit conversion skipped when followed by conversion to a wider type

jason at gcc dot gnu.org gcc-bugzilla@gcc.gnu.org
Tue Jul 12 13:57:00 GMT 2011


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=49626

Jason Merrill <jason at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |NEW
   Last reconfirmed|                            |2011.07.12 13:56:39
                 CC|                            |jason at gcc dot gnu.org
          Component|c++                         |c
     Ever Confirmed|0                           |1

--- Comment #2 from Jason Merrill <jason at gcc dot gnu.org> 2011-07-12 13:56:39 UTC ---
This does seem like a bug, since the documentation says "An explicit cast
silences the warning."  This bug also affects the C front end, so I'm changing
the category to C.

unsigned long f()
{
  short sh;
  return (unsigned int)sh;
}



More information about the Gcc-bugs mailing list