<p>I agree with <a href="https://github.com/codebrainz" class="user-mention">@codebrainz</a>'s point. The fully reliable mechanism would require implicit knowledge of the toolchain. Besides compiler's predefined macros (e.g. <a href="https://gcc.gnu.org/onlinedocs/cpp/Common-Predefined-Macros.html">https://gcc.gnu.org/onlinedocs/cpp/Common-Predefined-Macros.html</a>), there are language macros, which values can vary depending upon which language standard is selected (e.g. C90/C99/C11) and I think this is outside of scope of lighweight IDE.</p>

<p>I am not sure if it is worth to handle <code>#if 0</code> case alone or maybe narrow <code>#ifdef</code>s just to single translation unit, as already pointes by <a href="https://github.com/elextr" class="user-mention">@elextr</a> such partially working feature may be misleading and at the end do more harm than it is worth.</p>

<p style="font-size:small;-webkit-text-size-adjust:none;color:#666;">—<br />You are receiving this because you are subscribed to this thread.<br />Reply to this email directly, <a href="https://github.com/geany/geany/issues/1047#issuecomment-222930212">view it on GitHub</a>, or <a href="https://github.com/notifications/unsubscribe/ABDrJ8QPc1hjXHt4-FcvojvP9NgGCDfNks5qHUZfgaJpZM4IpR6k">mute the thread</a>.<img alt="" height="1" src="https://github.com/notifications/beacon/ABDrJzbquflI9IVGmgRYw6V-I1-cJY84ks5qHUZfgaJpZM4IpR6k.gif" width="1" /></p>
<div itemscope itemtype="http://schema.org/EmailMessage">
<div itemprop="action" itemscope itemtype="http://schema.org/ViewAction">
  <link itemprop="url" href="https://github.com/geany/geany/issues/1047#issuecomment-222930212"></link>
  <meta itemprop="name" content="View Issue"></meta>
</div>
<meta itemprop="description" content="View this Issue on GitHub"></meta>
</div>