This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug c/35592] New: Want attribute to enable precision loss warning


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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]