在 2022-02-12 23:02, Biswapriyo Nath 写道:
Yes, I created the IDL file manually. May I ask the reason why
`inline` should not be added? Should those be static functions?



It's because `inline` is not available in C89 and (even in C99) it has some fundamental differences from the C++ `inline`. Generally speaking, `static __inline` is preferred for simplicity.

The differences are explained earlier [1]. The most important one is that in C, unless `__attribute__((__always_inline__))` is also specified or optimization is enabled, GCC will not attempt to inline `inline` functions, so a definition without `inline` has to exist, otherwise users may get undefined references.


[1] https://sourceforge.net/p/mingw-w64/mailman/message/37319453/


--
Best regards,
LIU Hao

Attachment: OpenPGP_signature
Description: OpenPGP digital signature

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

Reply via email to