[Bug c/34389] -Wconversion produces wrong warning
manu at gcc dot gnu dot org
gcc-bugzilla@gcc.gnu.org
Thu Dec 13 21:38:00 GMT 2007
------- Comment #1 from manu at gcc dot gnu dot org 2007-12-13 21:38 -------
Confirmed.
When the expression "x & (short)0x7fff" reaches the warning code, it sees
"(int)x & 0x7fff". So it rightfully warns that an "int" expression is converted
to "short". This comes from conversions performed in build_binary_op. Not sure
what the appropriate fix would be...
--
manu at gcc dot gnu dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |manu at gcc dot gnu dot org
Status|UNCONFIRMED |NEW
Ever Confirmed|0 |1
Last reconfirmed|0000-00-00 00:00:00 |2007-12-13 21:38:26
date| |
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=34389
More information about the Gcc-bugs
mailing list