c - "extension"中 "Nested functions are supported as an extension in GNU C"的处理是什么?

标签 c function gcc standards

online manual , 我可以看到,

Nested functions are supported as an extension in GNU C, but are not supported by GNU C++.

这是什么意思?我如何获得该扩展?

最佳答案

您不需要获取扩展。这是 GNU C 编译器中嵌入的功能。

FWIW,此处的扩展 指向 C 标准的扩展。详细说明,来自online manual

6 . Extensions

GNU C provides several language features not found in ISO standard C. (The -pedantic option directs GCC to print a warning message if any of these features is used.) To test for the availability of these features in conditional compilation, check for a predefined macro GNUC, which is always defined under GCC.

关于c - "extension"中 "Nested functions are supported as an extension in GNU C"的处理是什么?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/34413081/

相关文章:

c - 此文件处理代码中存在运行时错误

javascript - 在简单函数中使用 if-if 或 if-else if-else

javascript - 我如何从 child 中提及 parent ?

python - 利用 Python Input() 对数据集执行 DateShift

c++ - 类违反三(五)规则时的编译器警告

gcc - `asm()`函数在C语言中是如何工作的?

gcc - 从 cygwin64 编译 32 位代码

c - Valgrind:有条件的跳跃或移动取决于未初始化的值

继续运行程序直到用户键入 Ctrl + a

c - 如何使用 header 将多个 c 文件链接在一起?