[cfe-dev] C99 index function

Albert Netymk albertnetymk at gmail.com
Fri May 24 02:33:17 PDT 2013


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?

Best Regards

Yours faithfully
Albert Netymk
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/cfe-dev/attachments/20130524/95379bac/attachment.html>

More information about the cfe-dev mailing list