Compiling the following snippet with whichever optimization on you get the error.
Is'nt possible to see which opcode/operand the compiler is trying to use (is there a way to force compiler to emit only assembler ?), but I suspect that it want use an addressing mode valid only for 64bits.
#include <Windows.h>
#include <stdio.h>
typedef struct
{
int a;
int b;
POINTS pts;
} OBJ;
OBJ Obj, *lpObj;
POINTS func1(OBJ *lpObj, LPPOINTS p)
{
return (POINTS){1,2};
}
DWORD func2(OBJ *lpObj, DWORD a, DWORD b)
{
return a;
}
DWORD func3(OBJ *lpObj, DWORD a)
{
return a;
}
void ffunc(OBJ *lpObj, LPARAM lParam)
{
POINTS pt1 = func1(lpObj, &lpObj->pts);
POINTS pt2 = func1(lpObj, &MAKEPOINTS(lParam));
/*** On the following line we have:
error #3114: [asm] Invalid combination of opcode and operands.
***/
if (abs(pt1.x - (pt2.x)) < 10)
goto Error;
func2 (lpObj, func3(lpObj, min(pt1.x, pt2.x) - lpObj->b),
func3(lpObj, max(pt1.x, pt2.x) - lpObj->b));
Error:
lpObj->b = FALSE;
}