Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
[cdt-dev] Outline problems in #if-def'ed code


I've recently been pushing a lot of cross platform code into CDT
(Standard make projects).   CDT generally handles this gracefully and copes
well even with heavily #if-def'ed code.  The CTags indexer has no problems
providing search -- and I'm looking forward to the goodness in PDOM.

The one area where things fall down noticeably is the outline view of a
file.  By default, the outline only shows the functions that are reachable
for a fixed set of #defines.  This behaviour works nicely when you're
compiling the project for a single target -- but is problematic when
working on multi-platform (read: #if-def'ed) code.  The outline winds
up hiding much of what you want to see.

Having a project-level option that lets the outline show all functions
defined in a file (i.e. process all code gated in #if-defs) would make
navigating this sort of code significantly easier.  

Sound reasonable?

/G

Graeme Johnson
J9 VM Team, IBM Ottawa Lab.

Back to the top