什么C99功能被认为是有害的或不支持 [英] What C99 features are considered harmful or unsupported

查看:125
本文介绍了什么C99功能被认为是有害的或不支持的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我平时写C code在C89,现在C99(的一些功能,如 intxx_t __ VA_ARGS __ 的snprintf )是非常有用的,而且甚至可以是至关重要的。

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.

我知道我们可以只检查我们的目标编译器的支持,但是这将缩小我们的支持了很多,因为这是开源软件,我想$具有较宽支承P $ PFER。

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.

  • 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.

扩展标识符和宽字符可能是问题点。

Extended identifiers and wide characters can be problem points.

请参阅这个列表中的gcc C99功能的问题。

这篇关于什么C99功能被认为是有害的或不支持的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆