如何检查声明是否为“extern”在海湾合作委员会通用?
我正在使用 GCC IR,我想检查 C 源代码中的声明是否为 extern
:
extern int i;
我想在 GENERIC 树上执行此操作,以获得类似的内容(类似于 TREE_STATIC
宏):
tree t;
if (TREE_EXTERN (t))
// do handling of extern
我已经检查了 GCC 内部文档,但没有找到需要的函数或宏。
I'm playing with GCC IR and I want to check if the declaration was extern
in C source:
extern int i;
I want to do that on GENERIC tree, to get something like this (by analogy to TREE_STATIC
macro):
tree t;
if (TREE_EXTERN (t))
// do handling of extern
I've checked the GCC Internals documentation, but didn't find the needed function or macro.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
我不是 GCC 内部的专家,但也许
DECL_EXTERNAL
就是您正在寻找的?I'm not an expert on GCC internals, but perhaps
DECL_EXTERNAL
is what you're looking for?