Eric Botcazou wrote:

Of course, it is not so dumb as to blatantly violate its specification.


If we use -ftrapv, then we have to make sure that operations labeled by the
front end as not requiring an overflow check are transformed into unsigned
operations by gigi.


I think it would be dangerous to take that path.

It is unhelpful to make such statements without justification.
Once again, have you actually examined how awtul the code we
generate now is?


I don't see that's so terrible, the jmp will be free in practice anyway
so I don't think you will find this slows things down.


You missed the point; the overflow check has been optimized away by one of the RTL optimization passes.

Well of course that's just a plain bug, should be addressed as such.
Obviously no one is using -ftrapv, so it will expose lots of bugs
I would guess.

Clearly the status quo is entirely unacceptable, so what's your
recommendation of how we generate at least vaguely respectable
code for overflow checking




Reply via email to