[cfe-dev] Error with function prototypes and __restrict

Nico Weber nicolasweber at gmx.de
Tue Dec 18 00:44:54 PST 2007


Hi,

here's another error (at least a deviation from gcc behaviour):


     s0539:src nico$ cat test.c

     #include <sys/select.h>
     extern int select (int, fd_set *, fd_set *, fd_set *, struct  
timeval *);


     s0539:src nico$ gcc -fsyntax-only test.c


     s0539:src nico$ ./clang test.c
     running "/Users/nico/src/llvm-svn/Debug/bin/clang -fsyntax-only  
test.c"
     test.c:3:12: error: redefinition of 'select'
     extern int select (int, fd_set *, fd_set *, fd_set *, struct  
timeval *);
                ^
     In file included from test.c:1:
     In file included from /usr/include/sys/select.h:152:
     /usr/include/sys/_select.h:39:6: error: previous definition is here
     int      select(int, fd_set * __restrict, fd_set * __restrict,
              ^
     2 diagnostics generated.


Nico



More information about the cfe-dev mailing list