clang++ 是否支持__restrict
Does clang++ support __restrict?
以下代码使用 g++ 4.7.1 编译,但不能使用 clang 3.1 编译
struct A
{
int foo();
};
int A::foo() __restrict
{
return 0;
}
int main(int argc, char * argv[])
{
A a;
return a.foo();
}
clang 是否支持__restrict
?还是使用特定的语法?
我手边没有 clang 3.1,但在 clang 4.1 下,我收到此错误:
t.cpp:6:8: error: out-of-line definition of 'foo' does not match any declaration
in 'A'
int A::foo() __restrict
^~~
t.cpp:3:7: note: member declaration nearly matches
int foo();
^
1 error generated.
如果我将 A::foo
的声明更改为以下内容,则 clang 4.1 成功编译它:
int foo() __restrict;
相关文章:
- 编译时未启用intel oneApi CUDA支持
- POCO::PostgreSQL:如何将std::vector支持添加到`Binder::bind`
- 使用CMake检测支持的C++标准
- 为什么istream不支持右值提取
- 当我编译webrtc服务器时,Windows上只支持clang-cl
- 扩展光电二极管探测器以支持多个传感器
- MSVC是否支持C++11样式的属性而不是__declspec
- 在使用GPU支持编译Tensorflow时,会遇到CUDA_TOOLKIT_PATH未绑定变量
- 当使用比格式支持的精度更高的精度来显示数字时,会写出什么数据
- 错误:(-210:不支持的格式或格式组合)功能'create'中的硬件视频解码器不支持视频源
- 哪个C++规范开始支持 std::vector
- 如何检测VS C++编译器是否支持C++11?
- CertGetCertificateChain 具有支持的内存存储和证书信任列表
- Casablanca/cpprestsdk listener.support接受函数,但不支持方法
- 将 IPv6 支持添加到雨量计
- 为什么C++不支持对未初始化变量进行智能分析?
- LMDB 是否支持随机读取?
- 在 c++ 中连接字符串和整数,以便在 C++ 11 不支持计算机的情况下读取多个文件
- 在 Ubuntu 18.04 上编译 GLSL 着色器时"不支持 GLSL 3.30"?
- 如何在多写入器情况下对文件支持的共享内存中的大页面出错