errors as i use the restrict qualifier

那年仲夏 提交于 2019-12-05 10:14:50

Not all compilers are compliant with the C99 standard. For example Microsoft's compiler, does not support the C99 standard at all. If you are using MSVC on a x86 platform you will not have access to this critical optimization option.

When using GCC, remember to enable the C99 standard by adding -std=c99 to your compilation flags. In code that cannot be compiled with C99, use either __restrict or __restrict__ to enable the keyword as a GCC extension.

From here.

Restrict is part of C99, and therefore you have to compile it as a C99 program by specifying -std=c99 flag to gcc.

gcc -std=c99 tester.c -o tester
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!