This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c/35592] Want attribute to enable precision loss warning
- From: "felix-gcc at fefe dot de" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 1 Apr 2008 16:09:31 -0000
- Subject: [Bug c/35592] Want attribute to enable precision loss warning
- References: <bug-35592-3511@http.gcc.gnu.org/bugzilla/>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
------- Comment #4 from felix-gcc at fefe dot de 2008-04-01 16:09 -------
I'm not familiar enough with how gcc works to say whether warning about
precision loss that turns out important later on can be done at all.
But I think we should not reject an idea because it only handles 60% of the
cases. Instead we should be happy we only have to worry about the other 40%,
not about 100% from then on.
I agree that signed int to size_t conversion for memcpy should also be warned
about by some attribute. Could be done by the same attribute.
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=35592