【发布时间】:2012-11-18 16:27:39
【问题描述】:
C 预处理器对代码进行了多少次传递?
我在 gcc 4.7.2 上测试了以下代码
#define a 5
#define b a
#define c b
#define d c
#define e d
#define f e
#define g f
#define h g
#define j h
#define k j
#define l k
#define m l
int main(void) {return d;}
没有错误:
$ gcc -E 1.c
# 1 "1.c"
# 1 "<command-line>"
# 1 "1.c"
# 14 "1.c"
int main(void) {return 5;}
这是标准行为吗?
【问题讨论】:
-
为什么会出现错误?
标签: c c-preprocessor