What is the point of the C99 standard?

后端 未结 6 1635
渐次进展
渐次进展 2021-02-19 07:17

C99 adds several useful features to the language, yet I find it difficult to recommend any practice which depends upon C99. The reason for this is because there are few (any?) a

6条回答
  •  遇见更好的自我
    2021-02-19 08:07

    C99 brings features that really makes programming in C easier and more error safe:

    • designated initializers
    • compound literals
    • for-scope variables
    • fixed width integer types

    The language is also much more expressive with

    • variadic macros
    • inline functions

    On my linux machine I have four compilers that support C99 to a satisfying extent that make this usable on a daily base: gcc, clang, opencc and icc.

    The first two are open source compilers where clang trying to be code compatible to gcc (meaning C99 support is about the same).

    The later two are from the two major CPU producers and are commercial but with generous license policy for non commercial users. Their C99 is a bit less, in particular their support for inline seems not completely consistent with the standard, yet.

提交回复
热议问题