[asterisk-dev] logging improvements

Kevin P. Fleming kpfleming at digium.com
Fri Jun 8 09:41:52 MST 2007

Dmitry Andrianov wrote:

> 1.       We depend on compiler’s support for var-arg defines. GCC does
> support them but I do not know what are target compilers for Asterisk
> nor will you accept such a dependency or not.

We mandate use of GCC (or compilers that provide most of GCC's
extensions, like ICC) for building Asterisk.

> 2.       We depend on compiler’s optimization of constant-condition ifs.
> ast_log macro expands to pretty big piece of code which can be optimized
> to just a single line if compiler does this type of optimization.

Any modern compiler will, unless optimization is disabled. See how often
we use 'do { } while(0)' which would generate lots of useless
conditional looping code if the compiler did not optimize it away :-)

Kevin P. Fleming
Director of Software Technologies
Digium, Inc. - "The Genuine Asterisk Experience" (TM)

More information about the asterisk-dev mailing list