2 votes 2 votes Compiler Design compiler-design lexical-analysis + – pC asked Nov 19, 2015 • retagged Jun 17, 2022 by Lakshman Bhaiya pC 2.7k views answer comment Share Follow See all 0 reply Please log in or register to add a comment.
Best answer 8 votes 8 votes It is not done during compilation- rather just before it. This is done as by macro processor which is before any of the compilation phase. You can see the output of macro expansion by using "-E" option in gcc. gcc -E file.c Arjun answered Nov 19, 2015 • selected Nov 21, 2015 by pC Arjun comment Share Follow See all 0 reply Please log in or register to add a comment.
2 votes 2 votes It is done in Preprocessor phase before compilation. Jyotsana Singh answered Nov 21, 2015 Jyotsana Singh comment Share Follow See all 0 reply Please log in or register to add a comment.
0 votes 0 votes As per Compiler Book by AHO If the source program uses a macro-preprocessor, the expansion of macros may also be performed by the lexical analyzer. aaaakash001 answered Dec 8, 2022 aaaakash001 comment Share Follow See all 0 reply Please log in or register to add a comment.