October, 2012

  • October 7, 2012

    Compiler name and version macros are predefined by all C/C++ compilers to enable #if/#endif sets around compiler-specific code, such as inline assembly, compiler-specific intrinsics, or special language features. This can be necessary in high-performance code that aims at using the best performance tricks available for each compiler. This article surveys common compilers and shows how to use predefined macros to detect the compiler name and version at compile time.

Syndicate content
Nadeau software consulting
Nadeau software consulting