如何在gcc中添加关键字?

时间:2022-11-16 02:11:24

My target is to analyze and learn in details of compiler development techniques. Here I want to add a keyword in gcc and see how it works.

我的目标是分析和学习编译器开发技术的细节。在这里,我想在gcc中添加一个关键字,看看它是如何工作的。

1 个解决方案

#1


You need to add an entry to c_common_reswords, in c-common.c. You'll need to allocate a new RID_ constant for that, and process it according to the semantics you want to give it.

您需要在c-common.c中为c_common_reswords添加一个条目。您需要为此分配一个新的RID_常量,并根据您想要的语义处理它。

#1


You need to add an entry to c_common_reswords, in c-common.c. You'll need to allocate a new RID_ constant for that, and process it according to the semantics you want to give it.

您需要在c-common.c中为c_common_reswords添加一个条目。您需要为此分配一个新的RID_常量,并根据您想要的语义处理它。