Newline inside macro expansion
Bansidhar Arvind Deshpande - CTD, Chennai.
bansidhara@ctd.hcltech.com
Sun Dec 14 16:58:00 GMT 2003
Hi all,
This may be simple C preprocessor question.
I want to write a macro which should have '\n' in its expansion.
e.g.
#define MAC(a,b) ........
If I call this macro as MAC(param1,param2) its expansion should be
as follows
if(a == param1)
b = param2;
Hence, I want '\n' (newline character) in macro expansion after if(a ==
param1) .
How can I write macro MAC so as to achieve above functionality.
Thanks,
--Bansidhar
More information about the Gcc
mailing list