Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Include Page
c:INT32-C-a. Ensure that integer addition operations do not result in an overflow
c:INT32-C-a. Ensure that integer addition operations do not result in an overflow

Right Shift Operator

...

Subtraction

Subtraction is between two operands of arithmetic type, two pointers to qualified or unqualified versions of compatible object types, or between a pointer to an object type and an integer type. (Decrementing is equivalent to subtracting one.)

...

Code Block
unsigned int ui1, ui2, result;

if ( (ui2 < 0) || (ui2 >= sizeof(int)*8) ) {
  /* handle error condition */
}
result = ui1 << ui2;

----

Anchor
Right Shift Operator
Right Shift Operator

Right Shift Operator

The shift operator is between two operands of integer type.

...