Versions Compared

Key

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

...

This CUBE() macro definition is noncompliant because it fails to parenthesize the replacement list.

Excerpt
hiddentrue

compliant=no,enclose=yes,compile=yes

Code Block
bgColor#FFcccc
#define CUBE(X) (X) * (X) * (X)
int i = 3;
int a = 81 / CUBE(i);

...

Code Block
bgColor#FFcccc
int a = 81 / CUBE(i);

expands to

Excerpt
hiddentrue

compliant=no,enclose=yes,compile=no

Code Block
bgColor#FFcccc
int a = 81 / i * i * i;

...