News for hackers. Stuff that matters.
Re:A semantic model for a substantial fragment of C by gravypod on Saturday April 01, 2017 @01:46AM (#14010689)
If F is a macro then it will just be expanded. Lets say F was

    #define f(a, b) printf("%d %d\n", a, b);
This would change absolutely nothing. A macro is just a piece of code that is expanded. It still follows all of the rules (and disallowances) of C.
Re:A semantic model for a substantial fragment of C by foota on Saturday April 01, 2017 @03:20AM (#14010999)
Fairly certain you can have compound statements as the result of the macro. e.g., the macro could expand to if(a) {printf("%d\n", b);} for example
Re:A semantic model for a substantial fragment of C by Normal_gaussian on Saturday April 01, 2017 @06:25AM (#14011461)
You can. Of course you don't even need the logical connector

    #define f(a,b)  \
        f_var1 = a; \
        f_var2 = b
Equally you could use macros to make it a whole lot worse

    #define f(a,b)  \
        f_arr[a][b] += f_arr[b][a]
Re:A semantic model for a substantial fragment of C by snovv_crash on Saturday April 01, 2017 @03:45AM (#14011057)
What if the macro uses a and/or b more than once?