Passing builtin gcc defines to other tools

Sometimes it’s necessary to pass all defines used during compilation to other programs like static code analysis tools. At least when you are using gcc, that’s actually quite simple. The first step is to ask gcc for all it’s builtin defines:

This gives a long list with #define’s:

Auto scroll Emacs compilation window

If you want your compilation window to scroll automatically, add the following line to your .emacs file: