tags:

views:

326

answers:

1

The Manual for Clang seems to be work in progress, so could you help me formulate the definitive command line options for compiling ANSI-C (AKA C89, C90) with maximum strictness and relevant/helpful warnings?

Clang is a compiler front end for the C, C++, and Objective-C programming languages. It uses the Low Level Virtual Machine (LLVM) as its back end. It is still under development. Its goal is to offer a replacement to the GNU Compiler Collection (GCC)

+1  A: 

Clang's command-line arguments are, for the most part, GCC-compatible, so -std=c90 -pedantic should suffice.

Yktula
I was told in the LLVM irc channel that there is no currently no complete listing for clang options so the general solution is in fact "man gcc"!
frou
You could even have an alias for gcc as clang. Compile times should speed up quite a bit, and switching compilers shouldn't be a problem for most projects.
Yktula
don't forget -Wall -Wextra
Good Person