用__stdcall声明函数指针的clang等价是什么?
What is the clang equvivalent this declaration of a function pointer with __stdcall?
我有一个函数指针的如下声明:
extern long (__stdcall *FooPtr)(int* i);
也就是说,一个函数指针,指向一个用标准调用约定(在VS术语中)调用的函数。
我如何翻译这个声明以便clang理解它?
__attribute__((stdcall))
是正确的答案:clang支持以下属性列表,这些属性在语法上与gcc非常相似。
。
#if defined(__clang__) || defined(__GNUC__)
#define stdCallConv __attribute__ ((stdcall))
#else
...
相关文章:
- 为不同配置设置MSVC_RUNTIME_LIBRARY的正确方法是什么
- C++避免重复声明的语法是什么
- 在C++中,将大的无符号浮点数四舍五入为整数的最佳方法是什么
- 实现无开销push_back的最佳方法是什么
- C++从另一个类访问公共静态向量的正确方法是什么
- Visual C++: MSVC vs. GCC+CLANG: 处理 lambda 捕获类成员变量,正确的方法是什么?
- Clang 8 带有静态 constexpr 和数组的链接器错误 - 错误是什么以及如何解决它?
- 是什么让 clang 在包含路径的子目录中看起来?
- Clang的措辞中"annotated fallthrough"和"partly annotated method"是什么?
- 错误是什么意思:..."bytes to alignment boundary" 在 Xcode/Clang 中?
- 使用 Clang 的 libtool 匹配 #includes(或 #defines)的正确方法是什么?
- 我的 LLVM & clang (OSX) 版本是什么?
- 是什么原因导致clang找不到无序映射标头
- 在Linux上为clang构建libc++的认可方法是什么
- sscanf中uint16_t的正确且可移植的(Clang/GCC)修饰符是什么
- clang中classof方法的目的是什么?
- Clang中的规范类型是什么?
- Clang / LLVM中的CodeModel指的是什么?
- 用__stdcall声明函数指针的clang等价是什么?
- Clang: AST(抽象语法树)是什么样子的?