 <p>According to <a href="http://cg.inf.unideb.hu/eng/rtornai/Kernighan_Ritchie_Language_C.pdf" rel="nofollow">K&amp;R</a>,</p> <p><strong>A.8.4 Enumeration</strong></p> <blockquote> <p>...</p> <p>The identifiers in an enumerator list are declared as constants of type int, and may appear wherever constants are required. If no enumerations with = appear, then the values of the corresponding constants begin at 0 and increase by 1 as the declaration is read from left to right. An enumerator with = gives the associated identifier the value specified; <strong>subsequent identifiers continue the progression from the assigned value</strong></p> </blockquote> <p>So <code>mes_foo=5</code>, <code>mes_bar=6</code> and <code>mes_joe=7</code>. You don't need to do anything at compile time to know these values. Their values are fixed.</p>