E.g.: $ cat test.c #include <unistd.h> $ gcc49 -c test.c In file included from test.c:1:0: /usr/local/lib/gcc49/gcc/x86_64-portbld-freebsd11.0/4.9.4/include-fixed/unistd.h: In function 'execl': /usr/local/lib/gcc49/gcc/x86_64-portbld-freebsd11.0/4.9.4/include-fixed/unistd.h:343:45: error: expected declaration specifiers before '__sentinel' int execl(const char *, const char *, ...) __sentinel; ^ /usr/local/lib/gcc49/gcc/x86_64-portbld-freebsd11.0/4.9.4/include-fixed/unistd.h:345:46: error: expected '=', ',', ';', 'asm' or '__attribute__' before '__sentinel' int execlp(const char *, const char *, ...) __sentinel; ^ /usr/local/lib/gcc49/gcc/x86_64-portbld-freebsd11.0/4.9.4/include-fixed/unistd.h:392:14: error: storage class specified for parameter 'optarg' extern char *optarg; /* getopt(3) external variables */ ^ /usr/local/lib/gcc49/gcc/x86_64-portbld-freebsd11.0/4.9.4/include-fixed/unistd.h:393:12: error: storage class specified for parameter 'optind' extern int optind, opterr, optopt; ^ /usr/local/lib/gcc49/gcc/x86_64-portbld-freebsd11.0/4.9.4/include-fixed/unistd.h:393:20: error: storage class specified for parameter 'opterr' extern int optind, opterr, optopt; ^ /usr/local/lib/gcc49/gcc/x86_64-portbld-freebsd11.0/4.9.4/include-fixed/unistd.h:393:28: error: storage class specified for parameter 'optopt' extern int optind, opterr, optopt; ^ /usr/local/lib/gcc49/gcc/x86_64-portbld-freebsd11.0/4.9.4/include-fixed/unistd.h:600:12: error: storage class specified for parameter 'optreset' extern int optreset; /* getopt(3) external variable */ ^ /usr/local/lib/gcc49/gcc/x86_64-portbld-freebsd11.0/4.9.4/include-fixed/unistd.h:343:6: error: old-style parameter declarations in prototyped function definition int execl(const char *, const char *, ...) __sentinel; ^ /usr/local/lib/gcc49/gcc/x86_64-portbld-freebsd11.0/4.9.4/include-fixed/unistd.h:343:1: error: parameter name omitted int execl(const char *, const char *, ...) __sentinel; ^ /usr/local/lib/gcc49/gcc/x86_64-portbld-freebsd11.0/4.9.4/include-fixed/unistd.h:343:1: error: parameter name omitted test.c:1:0: error: expected '{' at end of input #include <unistd.h> ^
Pretty broken!
This error is because gcc's fixincludes script has copied (and "fixed") some include files which are incompatible with the user's system (they're running an old -current that doesn't have __sentinel in <sys/cdefs.h>). The workaround is to upgrade the system to a newer -current. I notice that lang/gcc doesn't have an include-fixed directory at all (good), so perhaps a minor change is needed to avoid it in lang/gcc49 as well. I think neutralizing fixincludes completely somehow may be worth consideration, though. Some background information about fixincludes is at http://ewontfix.com/12/
Matteo has reported this independently and Paolo addressed it by renaming __sentinel to __null_sentinel, so current -CURRENT should be fine.