This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug libstdc++/30464] [regression] -Wconversion triggers warnings for deque<>::push_back()
- From: "pcarlini at suse dot de" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 20 Jan 2007 11:58:26 -0000
- Subject: [Bug libstdc++/30464] [regression] -Wconversion triggers warnings for deque<>::push_back()
- References: <bug-30464-231@http.gcc.gnu.org/bugzilla/>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
------- Comment #12 from pcarlini at suse dot de 2007-01-20 11:58 -------
(In reply to comment #11)
> Paolo or Gerald, could you try to collect a list of the warnings produced by
> -Wconversion?
Hi. I will double check ASAP, but definitely most of them are about signed ->
unsigned, exactly like in this specific PR. A very common idiom in C++, as
noted by Gaby. Probably, outside the "STL" there are also a few conversions
from larger to smaller unsigned types, which I think we can certainly fix in
the headers, being sensible warnings per the recent discussion. About the
signed *constant* -> unsigned issue, I don't think (maybe Gaby can correct me)
you can really tell it apart from the variable signed -> unsigned, because the
optimizers can see a constant in an inline function thanks to constant
propagation even if no constant is explicitely present in the code (I hope my
technically rather imprecise wording is sufficiently clear, sorry)
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=30464