This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug libstdc++/69386] [6 regression] r232586 breaks mingw-w64 bootstrap
- From: "redi at gcc dot gnu.org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Wed, 20 Jan 2016 11:21:51 +0000
- Subject: [Bug libstdc++/69386] [6 regression] r232586 breaks mingw-w64 bootstrap
- Auto-submitted: auto-generated
- References: <bug-69386-4 at http dot gcc dot gnu dot org/bugzilla/>
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=69386
--- Comment #2 from Jonathan Wakely <redi at gcc dot gnu.org> ---
OK I see the problem, this is a MinGW-w64 bug, but I can solve it in libstdc++.
windows.h includes windef.h which includes minwindef.h which does:
#ifdef __cplusplus
extern "C" {
#endif
...
#include <winnt.h>
and then winnt.h includes <stdlib.h> from inside the extern "C" block.
We can add extern "C++" to the libstdc++ headers to ensure our overloads get
the right language linkage even when included inside an extern "C" block.