在 Fri, 05 Jun 2009 11:18:43 +0800,davidl <[email protected]> 写道:
在 Fri, 05 Jun 2009 10:51:51 +0800,davidl <[email protected]> 写道:
在 Fri, 05 Jun 2009 08:51:25 +0800,Jarrett Billingsley
<[email protected]> 写道:
On Thu, Jun 4, 2009 at 8:50 PM, Jarrett Billingsley
<[email protected]> wrote:
http://www.digitalmars.com/d/archives/digitalmars/D/nedmalloc_47148.html
http://lists.puremagic.com/pipermail/digitalmars-d/2007-January/013224.html
Oops, meant to post this link instead:
http://www.digitalmars.com/d/archives/digitalmars/D/Compiling_nedmalloc_w_DMC_46240.html
attachment 2
Or, rather than dmc's codegen bug, I think I might trigger the nasty C
"bug" actually. C can call a function without any prior declaration of
it, and compiler needs to accept that, and create corresponding mangled
name.
The issue is probably the winbase.h is not up to date.
Err, no, there should still be some bug in dmc. I tried to modify the
calling to (long*)-1, dmc complains it can't implicitly cast from long* to
long.
To test this, get the nedmalloc source and change as following:
malloc.c.h
interlockedcompareexchange(&malloc_global_mutex_status, -1, 0) ==
0) {
changed to :
interlockedcompareexchange(&malloc_global_mutex_status, (long*)-1,
0) == 0) {
DMC would complain after this change. So we know that DMC knows the
prototype of that func.
I'm confused. :(
--
使用 Opera 革命性的电子邮件客户程序: http://www.opera.com/mail/