Here's a simple C file:
#include <stdio.h>
#include <stdlib.h>
int
main() {
printf("hi there!\n");
return 0;
}
Compiling with gcc -ansi -pedantic -pedantic-errors
gives this:
In file included from /usr/include/i386/_structs.h:38,
from /usr/include/machine/_structs.h:31,
from /usr/include/sys/_structs.h:57,
from /usr/include/sys/signal.h:154,
from /usr/include/sys/wait.h:116,
from /usr/include/stdlib.h:65,
from test.c:2:
/usr/include/mach/i386/_structs.h:91: error: type of bit-field ‘__invalid’ is a GCC extension
With lots more errors about GCC extensions. I know that I could just remove the -pedantic-errors
switch and recompile, but for one reason and another, that isn't in the cards. Is there a way to get past this error; perhaps downloading & installing another C library? I'm working locally on code that needs to compile on a remote machine, so I can't set up the Makefile to point at a special library location, unfortunately.