How universally is C99 supported?

后端 未结 7 1682
暖寄归人
暖寄归人 2020-12-13 09:08

How universally is the C99 standard supported in today\'s compilers? I understand that not even GCC fully supports it. Is this right?

Which features of C99 are suppo

7条回答
  •  爱一瞬间的悲伤
    2020-12-13 09:16

    Someone mentioned the Intel compiler has C99 support. There is also the Comeau C/C++ compiler which fully supports C99. These are the only ones I'm aware of.

    C99 features that I do not use because they are not well supported include:

    • variable length arrays
    • macros with variable number of parameters.

    C99 features that I regularly use that seem to be pretty well supported (except by Microsoft):

    • stdint.h
    • snprintf() - MS has a non-standard _snprintf() that has serious limitations of not always null terminating the buffer and not indicating how big the buffer should be

    To work around Microsoft's non-support, I use a public domain stdint.h from MinGW (that I modified to also work on VC6) and a nearly public domain snprintf() from Holger Weiss

    Items that are not supported by Microsoft, but will still use on other compilers depending on the project include:

    • mixed declarations and code
    • inline functions
    • _Pragma() - this makes pragmas much more usable

提交回复
热议问题