20.3.1 Compiler Version Macro

The compiler will define the constant __XC_DSC_VERSION__ , giving a numeric value to the version identifier. This can be used to take advantage of new compiler features while remaining backwardly compatible with older versions.

The value is based upon the major and minor version numbers of the current release. For example, release version 1.00 will have a __XC_DSC_VERSION__ definition of 1000. This macro can be used, in conjunction with standard preprocessor comparison statements, to conditionally include/exclude various code constructs.

The current definition of __XC_DSC_VERSION__ can be discovered by adding --version to the command line, or by inspecting the README.html file that came with the release.