【问题标题】:Sun Studio Compiler: implicit function declaration: typeofSun Studio 编译器:隐式函数声明:typeof
【发布时间】:2009-06-12 08:35:07
【问题描述】:

尝试使用 Sun Studio 编译器编译 mpd 时:

"client.c", line 438: warning: implicit function declaration: typeof

我在dlist.h 中找到了有问题的代码行:

#define list_for_each_entry(pos, head, member)                          \
        for (pos = list_entry((head)->next, typeof(*pos), member);      \
             &pos->member != (head);    \
             pos = list_entry(pos->member.next, typeof(*pos), member))

根据typeof Wikipedia article,这是一个 GCC 扩展。 Sun Studio 中是否有 typeof 等价物,或者可以模拟它的方法?

【问题讨论】:

  • 在 Sun Studio 12 工作中使用 #include 证明

标签: c typeof sunstudio


【解决方案1】:

This article 表示 typeof 是在 Sun Studio 12 中引入的。

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2021-01-20
    相关资源
    最近更新 更多