C99 index function


When I use clang to compile this file:

#include <stdio.h>

int index;
int main(int argc, char **argv)
return 0;

I got the error: redefinition of ‘index’ as different kind of symbol.

It turns out that index is one deprecated one function in posix.

Using gcc -std=c99 fixes the problem, but clang -std=c99 doesn’t do the trick. Any explanation?

this reduces to just