On Friday, 13 January 2023 08:06:23 PST Giuseppe D'Angelo via Development 
wrote:
> That's not what `inline` is for. Did you try doing a static build, and
> enable a sufficiently aggressive LTO?

Please note that C inline works differently from C++ inline.

In C, if the compiler decides not to inline the function, it will place an 
call to the out-of-line version of this function, but it won't define it for 
you. It's up to the implementer to define it somewhere, in the most functional 
form they want it. It need not be the same as the one that the original caller 
saw and it's not an ODR violation.

static inline in C is closer to C++'s inline. It's the same as C++'s static 
inline, actually. Which means that any out-of-line copies that were emitted 
will not be merged by the linker.

-- 
Thiago Macieira - thiago.macieira (AT) intel.com
  Cloud Software Architect - Intel DCAI Cloud Engineering

Attachment: smime.p7s
Description: S/MIME cryptographic signature

_______________________________________________
Development mailing list
Development@qt-project.org
https://lists.qt-project.org/listinfo/development

Reply via email to