什么C99功能被认为有害或不支持 [英] What C99 features are considered harmful or unsupported
问题描述
我通常在C89中编写C代码,现在C99的一些功能(如 intxx_t
或 __ VA_ARGS __
或<$
I usually write C code in C89, now some features of C99 (like intxx_t
or __VA_ARGS__
or snprintf
) are very useful, and can be even vital.
在我从C89到C99的更多我的要求之前,我想要一个非常有用的,知道哪些C99功能被广泛支持,哪些没有得到广泛支持,甚至被认为是有害的。
Before I more my requirements from C89 to C99 I wanted to know which of C99 features were widely supported and which ones were not widely supported or even considered harmful.
我知道我们可以检查我们的目标编译器支持,
I know we could just check our target compiler support, but this would narrow our support a lot, and as this is for open source software, I'd prefer having a wider support.
例如,我们使用Solaris(suncc)编译器和gcc ,但可能有其他编译器,我们会移动的方式,而我们可以保持兼容性很少的努力。
For example, we use Solaris (suncc) compiler and gcc, but there might be other compiler we would move out of the way while we could keep compatibility with very little efforts.
例如,我从来没有在Windows上工作,我也不知道任何关于Windows编译器,但保持Windows兼容性是很好的。
For example, I never worked on Windows nor I know anything about Windows compilers, but it would be good to keep Windows compatibility.
推荐答案
C99的许多功能是可选的,缺乏在技术上不符合。
A number of C99 features are optional, so their lack isn't technically non-conforming. I won't distinguish below.
-
嗯,win没有
< stdint.h> ;
,尽管有 stdint的开源版本。 h for Microsoft 。即使实现该文件,许多个别类型也会丢失。
Hmm, win doesn't have
<stdint.h>
, although there is an open-source version of stdint.h for Microsoft. Even when the file is implemented, many of the individual types are missing.
复杂和虚构的支援常常缺失或破裂。
Complex and imaginary support is often missing or broken.
字符可以是问题点。
这篇关于什么C99功能被认为有害或不支持的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!