[PATCH] Re: 1.7 winbase.h (ilockcmpexch) compile error

Dave Korn dave.korn.cygwin@googlemail.com
Tue Jul 7 23:59:00 GMT 2009

Dave Korn wrote:

>   It doesn't do anything about the reload failure, which is a bug in GCC-3,
> since the usage is a standard usage supported by the documentation.  It's
> possible that it may disappear as a side-effect, in which case all the better.

  Nope, no such luck.

  Also, the libstdc++ patch has really done for compiling it with gcc-3, which
doesn't support the weak attribute.  It also has a bug that for some reason
two of the wrapper functions in libstdcxx_malloc.cc are emitted under their
real names, rather than the asm("__real__*") name specified.  There's also the
inline asm bug and there's a number of other warnings about type conversions.

  All of these could in theory be worked around.  We could compile the files
using the inline asm with -O0, and fix the type conversion warnings(*), and we
would have to work around the lack of support for weaks in the compiler by
providing the definition of the __cygwin_cxx_malloc struct in assembler
source, and probably the same for the wrapper function names, but I'm not
inclined to do so unless there's serious demand for it.

(*) - actually, I'll send patches for those anyway.

More information about the Cygwin-patches mailing list