Rya*_*yan 6 c++ assembly xcode gcc inline-assembly
我还在和GCC打架- 编译下面的内联汇编代码(带-fasm-blocks,它启用了英特尔风格的汇编语法)给我一个奇怪的错误不能取'this'的地址,这是一个rvalue表达式 ...
MyClass::MyFunction()
{
_asm
{
//...
mov ebx, this // error: Cannot take the address of 'this', which is an rvalue expression
//...
mov eax, this // error: Cannot take the address of 'this', which is an rvalue expression
//...
};
}
Run Code Online (Sandbox Code Playgroud)
为什么我可以将指针存储到寄存器中的不同对象,但是不能使用指向MyClass实例的指针?
| 归档时间: |
|
| 查看次数: |
727 次 |
| 最近记录: |