Re: [Mingw-w64-public] [PATCH] headers: Don't use __gnu_inline__ with __mingw_ovr in C++ mode

2019-09-04 Thread Jacek Caban
On 03/09/2019 08:39, Martin Storsjö wrote: In C++ mode, __mingw_ovr is a plain "inline" without "static". Clang emits a standalone copy of functions in C++ for the combination of non-static inline and __gnu_inline__, leading to multiple definitions of symbols. I'm fine with this patch, but

[Mingw-w64-public] [PATCH] header: _FORTIFY_SOURCE: Add _read() and read()

2019-09-04 Thread Christian Franke
... From 751bb8a69dc0e9a0ae60854afbef60f3a3c74148 Mon Sep 17 00:00:00 2001 From: Christian Franke Date: Wed, 4 Sep 2019 22:53:36 +0200 Subject: [PATCH] header: _FORTIFY_SOURCE: Add _read() and read(). Signed-off-by: Christian Franke --- mingw-w64-headers/crt/io.h | 20 1

[Mingw-w64-public] [PATCH] headers: _FORTIFY_SOURCE: Print warning if original gets() is called

2019-09-04 Thread Christian Franke
Using original gets() is always unsafe. From fb71db412b9184cbb84761f4f91ef872d1c42b25 Mon Sep 17 00:00:00 2001 From: Christian Franke Date: Wed, 4 Sep 2019 22:12:53 +0200 Subject: [PATCH] headers: _FORTIFY_SOURCE: Print warning if original gets() is called. Signed-off-by: Christian Franke

Re: [Mingw-w64-public] [PATCH] headers: Don't use __gnu_inline__ with __mingw_ovr in C++ mode

2019-09-04 Thread Martin Storsjö
On Wed, 4 Sep 2019, Liu Hao wrote: 在 2019/9/4 15:14, Martin Storsjö 写道: However when targeting x86_64-w64-mingw32, GCC 9.2 still emits an external definition, which BTW is at the end of the assembly output with `__gnu_inline__` (and at the beginning without it), which matches the C++ inline

Re: [Mingw-w64-public] [PATCH] headers: Don't use __gnu_inline__ with __mingw_ovr in C++ mode

2019-09-04 Thread Liu Hao
在 2019/9/4 15:14, Martin Storsjö 写道: > I presume you mean [2] here? Yeah, sorry for this typo. > It's a shame that Godbolt doesn't have > mingw gcc cross compilers to clearly show off the differences there as > well. > > However, in your Godbolt example, you have "extern inline". Remove the >

Re: [Mingw-w64-public] [PATCH] headers: Don't use __gnu_inline__ with __mingw_ovr in C++ mode

2019-09-04 Thread Martin Storsjö
On Wed, 4 Sep 2019, Liu Hao wrote: 在 2019/9/4 4:09, Martin Storsjö 写道: In this case, it doesn't get emitted as .linkonce discard - I'm not sure exactly what's going on in this combination, whether it's contradicting itself in C++ mode, or if it's just a bug. I could take it up to try to fix