By default, I am using gcc for compiling all source code around (recently added with ccache). Since there’s now an Icinga issue with warnings when compiling Icinga Core with clang, I decided to have a look into it. FreeBSD users are well aware of it, since it’s their native default now 😉

On Debian Testing (Jessie), do

# apt-get install clang-3.4

Then set your environment to use clang as default for CC, and re-run configure and make to compile the project with clang.

$ export CC=clang
$ ./configure ...
$ make all

Best part – colored error marking, and detecting logic bugs as well. Such as unsigned long which cannot be lower than 0. Ever.

clang_icinga_core

%d bloggers like this: