Versions Compared

Key

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

...

This compliant solution follows the guidance of PRE00-C. Prefer inline or static functions to function-like macros by defining an inline function iabs() to replace the ABS() macro. Unlike the ABS() macro, which operates on operands of any type, the iabs() function will truncate arguments of types wider than int whose value is not in range of the latter type.

...

[Dewhurst 2002]Gotcha #28, "Side Effects in Assertions"
[ISO/IEC 9899:2011]Subclause 6.5.1.1, "Generic Selection" 
[Plum 1985]Rule 1-11

 

...

Image Modified Image Modified Image Modified