[NO REPLY] Operators (rev #2, 2018-1-15)

A place of insane ideas, nothing to see here.
Post Reply
User avatar
Giovanni
Site Admin
Posts: 14893
Joined: Wed May 27, 2009 8:48 am
Has thanked: 1202 times
Been thanked: 997 times

[NO REPLY] Operators (rev #2, 2018-1-15)

Post by Giovanni »

The overflow operator

Simply put, something ho handle arithmetic overflows or underflows without having to extend the integer size, example:

Code: Select all

if (ovf d = a + b - c) {
  error();
}


  • Lowest priority.
  • Operates on integer types.
  • Only perform checks on + - *
  • Basically it is a carry flag check after each operation.
  • It is an unary operator, the check is done on all compatible elementary operations on the right side expression

Giovanni
Post Reply