Hacking:Code Snippets/Miscellaneous

From GIMP Developer Wiki
Revision as of 20:07, 22 February 2014 by Scl (Talk | contribs)

(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search

Determining compiler

To make use of GCC specific features, use the __GNUC__ macro:

#ifdef __GNUC__

You can also grep the code for __GNU to find out existing samples to learn from.

To make use of LLVM/Clang specific features, use the Clang language extensions.

See also:

Common predefined macros in GCC

Pre-defined Compiler Macros page at Sourceforge.net