flame/blis

BUG: remove use of long-deprecated implicit function declarations (compat with newer clang)

h-vetinari opened this issue · 1 comments

ISO C23 finally removed K&R-style, implicit function declarations, and clang 16 now got stricter about enforcing the long-standing deprecation of these (introduced already as deprecated in the first C standard 🤯)

This causes compilation of blis to fail as follows:

blastest/f2c/open.c:180:7: fatal error: call to undeclared function '_access'; ISO C99 and later do not support implicit function declarations [-Wimplicit-function-declaration]
                if (access(buf,0))
                    ^
blastest/f2c/open.c:31:16: note: expanded from macro 'access'
#define access _access

AFAIU, GCC is planning to enable a similar warning by default starting in GCC 14.

Actually, I cannot tell if the reason is the use of an undeclared function, or whether the STL removed an incidental transitive includes (causing _access to be undefined). In any case, the fix is simply to # include <io.h>. I'll submit a PR