Why is the C++ preprocessor not doing arithmetic properly on enum values?
<p>The following code does NOT generate the <code>#error</code>, but instead compiles, runs, and output the trace value 37 (TT_LAST_PARM equals 53 and TT_FIRST_PARM equals 16):</p>

<pre><code>#if ((TT_LAST_PARM - TT_FIRST_PARM) &gt;= 32)
#error More than 32 parm tokens
#else
HTRACE("%d", TT_LAST_PARM - TT_FIRST_PARM);
#endif
</code></pre>

<p>If I hard code the values,</p>

<pre><code>#if ((53 - 16) &gt;= 32)
#error More than 32 parm tokens
#else
    HTRACE("%d", 53 - 16);
#endif
</code></pre>

<p>the pre-processor DOES generate the error:</p>

<p>Error   1   fatal error C1189: #error :  More than 32 parm tokens   d:\codeMTX\Knowbase\KBMatL\PrintParser.CPP  2663</p>