Questions tagged «function-call»


9
为什么“不归还”功能归还?
我读 这个问题关于noreturn属性,它被用于那些不返回到调用函数。 然后我用C编写了一个程序。 #include <stdio.h> #include <stdnoreturn.h> noreturn void func() { printf("noreturn func\n"); } int main() { func(); } 并使用此生成的代码汇编: .LC0: .string "func" func: pushq %rbp movq %rsp, %rbp movl $.LC0, %edi call puts nop popq %rbp ret // ==> Here function return value. main: pushq %rbp movq %rsp, %rbp …
By using our site, you acknowledge that you have read and understand our Cookie Policy and Privacy Policy.
Licensed under cc by-sa 3.0 with attribution required.