CLU icon indicating copy to clipboard operation
CLU copied to clipboard

Link errors with Clang 3.4 due to incorrect use of inline

Open bmerry opened this issue 11 years ago • 0 comments

C99 has different semantics from C++ for inline functions. This causes Clang to generate link errors. See http://clang.llvm.org/compatibility.html#inline for more explanation.

The simplest fix is probably to change the inline functions to static inline. Alternatively, the inline functions in clu.h could have out-of-line implementations in clu_runtime.c - but that would need some verification to check that this works under all the flavours of inlining (C99, gnu89, C++, MSVC's not-quite-C compiler).

Note that this affects both clu.h and the code generated by clu_generator.

bmerry avatar Nov 03 '13 10:11 bmerry