...
This noncompliant code example also contains inadequately bounds multiple , unbound statements.
Code Block | ||
---|---|---|
| ||
/* * Swaps two values. * Requires tmp variable to be defined. */ #define SWAP(x,y) { int tmp; tmp=x; x=y; y=tmp; } |
This macro fails to expand correctly in some case such as the following example which is meant to be an if-statement with two branches:
...
Code Block | ||
---|---|---|
| ||
if (x > y) { /* Single-branch if-statement!!! */ int tmp; = x; /* The one and only branch consists */ tmpx = xy; /* of the block. */ x = y; y = tmp; } ; /* empty statement */ else /* ERROR!!! "parse error before else" */ do_something(); |
...