On Tue Aug 12 17:20:29 2025 +0000, Elizabeth Figura wrote:
What I'm saying is that we can use Jacek's proposal above, but instead of putting it in a .c file, it's put in .h included from the implementation, and then myint_dec() et al. are static. That would cause compiler errors rather than linker errors, as you desire, and would be better for the compiler anyway as they can be inlined. Am I missing something?
The issue is that these kind of warnings/errors don't seem to be reported by clangd. I'm not completely sure where this comes from but I believe it might be a decision, for performance reasons, as https://github.com/clangd/clangd/issues/137 suggests.
As the functions would be declared and used in the header files only, it would require the tools to fully analyze every header to catch every possible errors. For performance reasons the LSP tools don't perform full compilation, but take shortcuts to provide shorter response time.
This was actually the reason why I chose to use a function table, which doesn't suffer from this issue, and keeps the user experience on a similar level as it is right now with individual interface vtables.