stardot/MatrixBrandy

clang error

Closed this issue · 1 comments

[ 46%] Building C object CMakeFiles/brandy.dir/src/mos_sys.c.o
/Users/polluks/g/MatrixBrandy/src/mos_sys.c:158:81: error: function definition is not allowed here
                    volatile double fm, volatile double fn, volatile double fo) {
                                                                                ^
/Users/polluks/g/MatrixBrandy/src/mos_sys.c:174:12: error: implicit declaration of function 'wrapper' is invalid in C99 [-Werror,-Wimplicit-function-declaration]
    return wrapper (inregs[17].f, inregs[18].f, inregs[19].f, inregs[20].f,
           ^
2 errors generated.
make[2]: *** [CMakeFiles/brandy.dir/src/mos_sys.c.o] Error 1
make[1]: *** [CMakeFiles/brandy.dir/all] Error 2
make: *** [all] Error 2

Clang doesn't support nested functions, which are needed for this implementation of passing parameters to a routine in a shared library.
Thus, the change I've just committed to fix this means the ability to open a shared library and call routines from it is only enabled for gcc builds.