This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c/35592] New: 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: 14 Mar 2008 19:18:12 -0000
- Subject: [Bug c/35592] New: Want attribute to enable precision loss warning
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
gcc has a warning if one assigns a pointer to an integer of lower width.
I would like to have a way to be warned if someone calls malloc(long long) on
32-bit platforms. A general warning about integer truncation would generate
lots of spam, so I suggest adding a way to say "if an integer given to this
function is implicitly truncated, that's a bug). The main target would be
malloc and malloc-like functions, obviously.
--
Summary: Want attribute to enable precision loss warning
Product: gcc
Version: 4.3.0
Status: UNCONFIRMED
Severity: enhancement
Priority: P3
Component: c
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: felix-gcc at fefe dot de
GCC build triplet: x86_64-unknown-linux-gnu
GCC host triplet: x86_64-unknown-linux-gnu
GCC target triplet: x86_64-unknown-linux-gnu
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=35592