This code does not compile for me on GCC version 4.3.2 (Debian 4.3.2-1.1)
main() {
int unix;
}
I’ve checked the C keywords list and “unix” is not one of them.
Why am I getting the following error?
unix.c:2: error: expected identifier or ‘(’ before numeric constant
unixis not a identifier reserved by the Standard.If you compile with
-std=c89or-std=c99the gcc compiler will accept the program as you expected.From gcc manual ( https://gcc.gnu.org/onlinedocs/cpp/System-specific-Predefined-Macros.html ), the emphasis is mine.