------- Comment #6 from felix-gcc at fefe dot de 2008-04-01 19:34 ------- Sure. For example:
char* c=malloc(lseek(somefd,0,SEEK_END); on a platform where off_t is 64-bit, but where size_t is 32-bit. For example: i686-linux with #define _FILE_OFFSET_BITS 64. Now that I'm thinking about it, would it be possible to have a generic overflow warning in that context? For example, malloc(p->len+1) So that gcc sees I'm adding something there, and if the range is not clamped down before that gives an error? -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=35592