#463 tags generation issues

None
pending-out-of-date
nobody
General (289)
Unknown
5
2014-08-16
2010-04-01
Anonymous
No

If I try to generate tags from C headers in geany 0.18.1 like this:

CFLAGS=`pkg-config --cflags gtksourceview-2.0` geany -g gtksourceview.c.tags /usr/include/gtksourceview-2.0/gtksourceview/gtksourceview.h

It does not generate anything for the types.

But If I do it like this it does just fine:

gcc `pkg-config --cflags gtksourceview-2.0` -E /usr/include/gtksourceview-2.0/gtksourceview/gtksourceview.h > out.h
geany -g -P gtksourceview.c.tags out.h

Not sure what is causing this behavior but this is the workaround I found. This does not appear to be the desired behavior. Please fix it. Thanks.

Discussion

  • Forgot to mention: geany version 0.18.1 using the binary in Frugalware Linux (current branch)

     
    • status: open --> pending-out-of-date
    • Found in: --> Unknown
    • Fixed in: --> None
     
  • Seems to work for me as of today.

    However, one possible workaround when tags are missing is the use of ignore.tags (see the docs). The issue being that with C preprocessor an identifier might appear somewhere unexpected while actually just expanding to something harmless -- or even nothing. An example is GLib's G_GNUC_* macros that expand to __attribute__(...) or nothing, and that, if not ignored through ignore.tags, prevent the parser from understanding the preceding declaration.
    This would also explain why pre-processing the source first would help, as this trips any preprocessor directive.