This affects the whole Watcom family, including AsmC:
OPTION PROLOGUE:MyPrologue
OPTION EPILOGUE:MyEpilogue
WndProc proc hWnd, uMsg, wParam:WPARAM, lParam:LPARAM
if 0 ; GOOD, this one works
LOCAL psvar:PAINTSTRUCT, rc:RECT
else ; BAD, this one fails
LOCAL rc:RECT, psvar:PAINTSTRUCT
endif
; int 3
mov edx, hWnd
mov rc.left, 11111111h
mov rc.right, 33333333h
if 0
00401006 ³. CC int3
00401007 ³. 8B55 08 mov edx, [ebp+8]
Watcom family:
0040100A ³. C745 0E 11111111 mov dword ptr [ebp+0E], 11111111
00401011 ³. C745 16 33333333 mov dword ptr [ebp+16], 33333333
MASM:
0040100A ³. C745 F0 11111111 mov dword ptr [ebp-10], 11111111
00401011 ³. C745 F8 33333333 mov dword ptr [ebp-8], 33333333
endif
invoke crt_printf, cfm$("WP2 Args received: %x, %x, %x, %x, rcl=%x, rcr=%x\n"), hWnd, uMsg, wParam, lParam, rc.left, rc.right
ret
WndProc endp
Full code attached, as plain Masm32.