This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c/49626] Explicit conversion skipped when followed by conversion to a wider type
- From: "jason at gcc dot gnu.org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Tue, 12 Jul 2011 13:57:12 +0000
- Subject: [Bug c/49626] Explicit conversion skipped when followed by conversion to a wider type
- Auto-submitted: auto-generated
- References: <bug-49626-4@http.gcc.gnu.org/bugzilla/>
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;
}