Versions Compared

Key

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

...

Code Block
int a = 81 / ((++i) * (++i) * (++i));

which is undefined . (See see EXP30-C. Do not depend on the order of evaluation for side effects).)

Compliant Solution

When the macro definition is replaced by an inline function, the side effect is executed only once before the function is called:

...

ToolVersionCheckerDescription

ECLAIR

Include Page
ECLAIR_V
ECLAIR_V

CC2.PRE00

Fully implemented

LDRA tool suite

Include Page
LDRA_V
LDRA_V

340 S

Enhanced Enforcementenforcement

PRQA QA-C
Include Page
PRQA QA-C_v
PRQA QA-C_v
3453Fully implemented

...