if
, while
, and for
blocks. Results may not be what you expect! Example:
#define FOO(A) func1(A); func2(A); int main() { // ... if( a ) A(a); }
will turn out to be
if(a) func1(a); // called only if a!=0 func2(a);; // always called! note obsolete ';'!
cc -Wall -g -I. -E source.c | less
To see what comes out of the preprocessor as it would go into the compiler but with all the #define statements left in (i.e., all #define statements are shown where they appear in the source code, but the preprocessor has replaced the occurrences in the text. this is a debugging option.):
cc -Wall -g -I. -E -dD source.c | less