code * __pascal cat (code *c1 , code *c2 );
backend\code.h(514) : error C2146: syntax error : missing ';' before identifier 'cat'
backend\code.h(514) : error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
Resolution:
Change in code.h:514:
FROM
code * __pascal cat (code *c1 , code *c2 );
TO
code * cat (code *c1 , code *c2 );
And in cgen.c:95
FROM
#if TX86 && __INTSIZE == 4 && __SC__
__declspec(naked) code * __pascal cat(code *c1,code *c2)
{
_asm
{
mov EAX,c1-4[ESP]
mov ECX,c2-4[ESP]
test EAX,EAX
jne L6D
mov EAX,ECX
ret 8
L6D: mov EDX,EAX
cmp dword ptr [EAX],0
je L7B
L74: mov EDX,[EDX]
cmp dword ptr [EDX],0
jne L74
L7B: mov [EDX],ECX
ret 8
}
}
#else
code * __pascal cat(code *c1,code *c2)
{ code **pc;
if (!c1)
return c2;
for (pc = &code_next(c1); *pc; pc = &code_next(*pc))
;
*pc = c2;
return c1;
}
#endif
TO
code * cat(code *c1,code *c2)
{ code **pc;
if (!c1)
return c2;
for (pc = &code_next(c1); *pc; pc = &code_next(*pc))
;
*pc = c2;
return c1;
}
Comment #1 by bearophile_hugs — 2013-09-22T05:23:04Z
'blocker' is the highest importance for a bug. Why is compiling dmd with VS12 so important?
Comment #2 by temtaime — 2013-09-22T05:24:52Z
It's not so important, but it's a blocker. But ok, i chanded this.
Comment #3 by andrej.mitrovich — 2014-04-27T19:43:43Z
If you can reproduce this with git-head please reopen. Thanks.
Comment #4 by dlang-bugzilla — 2014-04-27T19:48:52Z
I can't reproduce this problem. This was either fixed since the issue was reported, or it was never broken.
I don't understand why you advocate removing an entire optimized variant of the function when it would be simpler to #define __pascal to nothing. Which is what is already done in vcbuild/warnings.h, so I don't know where your error comes from.