wordpress   发布时间:2022-04-02  发布网站:大佬教程  code.js-code.com
大佬教程收集整理的这篇文章主要介绍了为什么uint会使用-std = c99消失?大佬教程大佬觉得挺不错的,现在分享给大家,也给大家做个参考。

概述

// Filename: test.c #include <sys/types.h> int main() { uint a; return 0; } 上面的代码能够使用gcc和clang编译,标准如gnu89或gnu99.换句话说,以下工作. $gcc test.c # for the default is std=gnu89 $clang test.c # for the de
// Filename: test.c
#include <sys/types.h>
int main() {
    uint a;
    return 0;
}

上面的代码能够使用gcc和clang编译,标准如gnu89或gnu99.换句话说,以下工作.

$gcc test.c # for the default is std=gnu89
$clang test.c # for the default is std=gnu99

但是,以下错误导致错误“未声明的uint”.

$gcc -std=c99 test.c
$clang -std=c99 test.c

有人可以解释为什么uint的定义在c99标准中消失了吗?

解决方法

因为C标准没有定义/要求类型uint.它很可能是编译器,系统或库特定的便利类型.不要使用它.

大佬总结

以上是大佬教程为你收集整理的为什么uint会使用-std = c99消失?全部内容,希望文章能够帮你解决为什么uint会使用-std = c99消失?所遇到的程序开发问题。

如果觉得大佬教程网站内容还不错,欢迎将大佬教程推荐给程序员好友。

本图文内容来源于网友网络收集整理提供,作为学习参考使用,版权属于原作者。
如您有任何意见或建议可联系处理。小编QQ:384754419,请注明来意。
标签: