I want to work with a C code with a lot of #ifdef directives. I wonder if there is a program, that will show me, which of these #ifdef's will be left in the code, and which will be cut out by preprocessor.

Or, maybe, a tool, showing a list of defined preprocessor variables for this exact position in the source.

  • 1
    Take a look at sunifdef. Not updated in almost 8 years, but the C preprocessor hasn't exactly seen active development since than, either. It works pretty well in my experience. – Sato Katsura Dec 1 '15 at 20:35
  • I found a emacswiki.org/emacs/HideIfDef , which allows hiding unused code. Haven't tested it yet. Should be useful. – Peret Finctor Jan 5 '16 at 11:24

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.