【发布时间】:2009-04-16 10:07:35
【问题描述】:
我现在愿意使用-std=c99 编译我的项目,但我遇到了一个我暂时不理解的错误。这一行:
my_type* td = ({ register kmy_type* arg0 asm("eax"); arg0; });
仅在 C99 中给我以下错误:
warning: ISO C forbids nested functions
error: syntax error before ‘asm’
error: ‘arg0’ undeclared (first use in this function)
error: (Each undeclared identifier is reported only once
error: for each function it appears in.)
warning: ISO C forbids braced-groups within expressions
欢迎任何线索帮助我理解这意味着什么。这行不是我写的,我也不确定它的目的是什么。
【问题讨论】:
-
尝试改用 -std=gnu99。
标签: c assembly c99 inline-assembly