在 2019/9/3 14:39, Martin Storsjö 写道:
> 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.
> 
> Signed-off-by: Martin Storsjö <[email protected]>
> ---
>  mingw-w64-headers/crt/_mingw_mac.h | 21 +++++++++++++++------
>  1 file changed, 15 insertions(+), 6 deletions(-)
> 
> 

I understand what happened with clang but... isn't this clang's bug? It
is as expected that a out-of-line definition is emitted because inline
functions have external linkage in C++, which however should be
specified as `.weak` (on Linux etc.) and `.linkonce discard` on Windows.
So I am a bit curious how the multiple definition error could happen.


-- 
Best regards,
LH_Mouse



_______________________________________________
Mingw-w64-public mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/mingw-w64-public

Reply via email to