This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Newline inside macro expansion
- From: "Bansidhar Arvind Deshpande - CTD, Chennai." <bansidhara at ctd dot hcltech dot com>
- To: gcc at gcc dot gnu dot org
- Date: Sun, 14 Dec 2003 21:01:45 +0530
- Subject: Newline inside macro expansion
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