在C程序编译的哪个阶段,在调用函数中插入了一个内联函数
At what stage of C program compilation, an inline function is inserted into the caller function
在宏扩展的情况下,插入发生在预处理阶段。
但是如果是内联,编译器会在哪个编译阶段决定是插入它还是作为普通函数本身调用。
如果选择插入,在什么阶段插入。
"Compiler stages" 并不是真正的标准化术语。 C语言只规定了一个叫做translation phases的东西,它详细规定了各个预处理器阶段,但对预处理之后进行的所有工作却很模糊。被标准归纳为最终翻译阶段:
All external object and function references are resolved. Library components are
linked to satisfy external references to functions and objects not defined in the
current translation. All such translator output is collected into a program image
which contains information needed for execution in its execution environment.
这包括优化和生成可执行二进制文件之前需要完成的任何其他工作。有关如何以及何时完成的所有细节,都留给编译器实现来决定它们认为合适。
在宏扩展的情况下,插入发生在预处理阶段。
但是如果是内联,编译器会在哪个编译阶段决定是插入它还是作为普通函数本身调用。
如果选择插入,在什么阶段插入。
"Compiler stages" 并不是真正的标准化术语。 C语言只规定了一个叫做translation phases的东西,它详细规定了各个预处理器阶段,但对预处理之后进行的所有工作却很模糊。被标准归纳为最终翻译阶段:
All external object and function references are resolved. Library components are linked to satisfy external references to functions and objects not defined in the current translation. All such translator output is collected into a program image which contains information needed for execution in its execution environment.
这包括优化和生成可执行二进制文件之前需要完成的任何其他工作。有关如何以及何时完成的所有细节,都留给编译器实现来决定它们认为合适。