gpt4 book ai didi

c - GNU99 和 C99 (Clang) 有什么区别?

转载 作者:太空狗 更新时间:2023-10-29 16:18:05 25 4
gpt4 key购买 nike

我看到了编译器选项 GNU99 和 C99。他们有什么区别?有详细的文档吗? (Clang, Xcode, Mac OS X)

最佳答案

Differences between various standard modes

clang supports the -std option, which changes what language mode clang uses. The supported modes for C are c89, gnu89, c94, c99, gnu99 and various aliases for those modes. If no -std option is specified, clang defaults to gnu99 mode.

Differences between all c* and gnu* modes:

  • c* modes define __STRICT_ANSI__.
  • Target-specific defines not prefixed by underscores, like "linux", are defined in gnu* modes.
  • Trigraphs default to being off in gnu* modes; they can be enabled by the -trigraphs option.
  • The parser recognizes "asm" and "typeof" as keywords in gnu* modes; the variants __asm__ and __typeof__ are recognized in all modes.
  • The Apple "blocks" extension is recognized by default in gnu* modes on some platforms; it can be enabled in any mode with the -fblocks option.

更多链接

关于c - GNU99 和 C99 (Clang) 有什么区别?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/5313536/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com