This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c++/18821] Please add warning if bits thrown away in integral conversions
- From: "manu at gcc dot gnu dot org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 26 Nov 2006 13:57:52 -0000
- Subject: [Bug c++/18821] Please add warning if bits thrown away in integral conversions
- References: <bug-18821-9730@http.gcc.gnu.org/bugzilla/>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
------- Comment #4 from manu at gcc dot gnu dot org 2006-11-26 13:57 -------
This will be fixed by the new Wconversion option. Actually, it has been fixed
already for gcc version 4.3.0 20061124 (experimental).
manuel@gcc05:~$ local/bin/g++ -c -Wconversion pr18821.C
pr18821.C: In function ?int main()?:
pr18821.C:8: warning: conversion to ?short unsigned int? from ?long unsigned
int? may alter its value
I hope this makes you happy!
It is a shame that I missed this bug in the Changelog. Should I modify the
Changelog or what is done is done ?
--
manu at gcc dot gnu dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |manu at gcc dot gnu dot org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=18821