blog http://www.nersc.gov/users/software/compilers/cray-compilers/cray-bug-reports/ Cray C/C++ predefined _RELEASE macro returns wrong value [updated] http://www.nersc.gov/users/software/compilers/cray-compilers/cray-bug-reports/cray-c-c-predefined-release-macro-returns-wrong-value/ <p><strong>Status:  Reported to Cray as bug 797442, became documentation bug 805340.</strong></p> <p>Updated October 14, 2014 by Scott French, NERSC USG</p> <p>According to the Sept, 2013, version of the Cray C/C++ manual at docs.cray.com, Chapter 10, "Using Predefined Macros":</p> <table border="1"><thead><tr><th align="left" valign="top"> <p>Macro</p> </th><th align="left" valign="top"> <p>Description</p> </th></tr></thead><tbody><tr><td align="left" valign="top">_RELEASE</td> <td align="left" valign="top"> <p>Defined as the major release level of the compiler.</p> </td> </tr></tbody></table><p>_RELEASE returns the value 11 and not the major release number, currently 8.</p> <p>Cray told us and we have verified that the _RELEASE_MAJOR macro will return the correct value for the major release level, but they have not formally documented this. This has caused problems with cmake for some users.</p> <p>As of October 2014, Chapter 10 of the Cray C and C++ Reference Manual (S-2179-83) correctly indicates that _RELEASE_MAJOR should be used (and not _RELEASE).</p> Mon, 18 Nov 2013 12:44:43 -0800 http://www.nersc.gov/users/software/compilers/cray-compilers/cray-bug-reports/cray-c-c-predefined-release-macro-returns-wrong-value/