Technically, this is a warning, but Cygwin enables -Werror, so it is
treated as an error:
../../../../winsup/cygwin/exceptions.cc: In member function βint
_cygtls::call_signal_handler()β:
../../../../winsup/cygwin/exceptions.cc:1720:33: error: β<anonymous>β may
be used uninitialized in this function [-Werror=maybe-uninitialized]
1720 | RtlCaptureContext ((PCONTEXT) &context.uc_mcontext);
| ~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
cc1plus: all warnings being treated as errors
We saw this in msys2-runtime already when we updated w32api
(https://github.com/msys2/msys2-runtime/issues/214) but we kind of
attributed it to the fact that we were using a newer version of gcc. But
I just reproduced this building cygwin on cygwin using the instructions at
https://www.cygwin.com/faq.html#faq.programming.building-cygwin
When I investigated this, the only apparently relevant change I saw was
the addition of __attribute__((__returns_twice__)) on RtlCaptureContext in
e98e24be8cdb53a1a9e8026b348d33f820a322f6. To test, I commented out the
attribute in /usr/include/w32api/winnt.h and the build succeeded.
I'm not sure if this is an issue in mingw-w64, cygwin, or gcc. Thought
I'd report it here first, since this change triggered it.
_______________________________________________
Mingw-w64-public mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/mingw-w64-public