Re: integer overflow detection

2011-04-27 Thread Gaius Mulley
"Joseph S. Myers" writes: > See PR 48580 for discussion of possible approaches for representing > overflow detection and handling (and, in particular, making -ftrapv work > properly and making -fwrapv and -ftrapv affect the IR generated by front > ends instead of being global flags), both in G

Re: integer overflow detection

2011-04-27 Thread Joseph S. Myers
See PR 48580 for discussion of possible approaches for representing overflow detection and handling (and, in particular, making -ftrapv work properly and making -fwrapv and -ftrapv affect the IR generated by front ends instead of being global flags), both in GIMPLE and at the C source level. -

integer overflow detection

2011-04-27 Thread Gaius Mulley
Hi, I was wondering whether there is an easy way for a front end to detect whether an integer overflow had occurred? Currently the GNU Modula-2 front end will detect cardinal number and integer subrange out of bound (during assignment, INC and DEC). However it does not detect overflows for thes