|
On 1-Sep-05, at 10:19 AM, Antero Vipunen wrote:
Who speaks about CPP? For example Intel Compiler handles such cases in a sane way.----------test.c------------------------------ #define TEST(a) do { a; } while(0) TEST(a = b); TEST(print(a,b,c) if(a) {b;c;d}); TEST({if(a) {b;c;d;}}); ----------------------------------------------
None of those test cases has a "," unprotected by "("..")"gnu cpp does not implement arbitrary semantics, by the way. C pre-processing semantics are defined in great detail in the ANSI standard. If your cpp is not conformant, you should get another one. (But I suspect that Intel's is.)