On 2017/4/4 0:48, David Grayson wrote: > I'm a bit confused about the different inlining keywords. From the GCC > documentation for inlining in the C language ( > https://gcc.gnu.org/onlinedocs/gcc/Inline.html ) it seemed like "extern > inline" (i.e. __CRT_INLINE) would be the best thing to use, but I could not > find any cases where __inline (which I think is a macro) is worse. > LH_Mouse's patch does not change what kind of inlining keywords are used, > it just changes the logic for when to use those keywords. If you have multiple `extern inline` definitions in different translation units (TU), a C++ compiler is smart enough to mark them as 'link once', so the linker will only pick the first definition it finds and discard the rest. This isn't the case in C. If you have an `extern inline` function _defined_ in a header, the definition would end up in every TU that refers that header, resulting in multiple definitions of that function.
> Anyway, I tested LH_Mouse's second patch and it works for me, so I'd say > it's mergeable. Thanks for testing. I am looking to Jacek's opinion. -- Best regards, LH_Mouse ------------------------------------------------------------------------------ Check out the vibrant tech community on one of the world's most engaging tech sites, Slashdot.org! http://sdm.link/slashdot _______________________________________________ Mingw-w64-public mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/mingw-w64-public
