I am trying to get the C clang compiler to go into ANSI C89 mode, but without success.
Here is an example session:
$ cat tc #include <stdio.h> int main(void) { puts(__FUNCTION__); return 0; } $ gcc -pedantic -std=c89 -Wall tc tc: In function 'main': tc:5:7: warning: ISO C does not support '__FUNCTION__' predefined identifier [-Wpedantic] puts(__FUNCTION__); ^~~~~~~~~~~~ $ clang -pedantic -std=c89 -Wall tc $ clang --version clang version 3.8.1-24 (tags/RELEASE_381/final) Target: x86_64-pc-linux-gnu Thread model: posix InstalledDir: /usr/bin
As you can see, the clang command completed without warning. Is there a command option that I'm missing here?
source share