For example:

#ifdef USE_GTK
#include "gtkutil.h"
#ifdef HAVE_GTK3
#include <X11/Xproto.h>
#endif
#endif

You can examine the above code here: http://repo.or.cz/w/emacs.git/blob/HEAD:/src/xterm.c#l91

Semantic cannot jump to the header #include <X11/Xproto.h>, but when put it outside the #ifdef USE_GTK...#endif, Semantic can jump fine.

Tu.