all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* bug#38511: etags seems to be confused by macros
@ 2019-12-06 20:20 Skip Montanaro
  2019-12-07  7:14 ` Eli Zaretskii
  0 siblings, 1 reply; 6+ messages in thread
From: Skip Montanaro @ 2019-12-06 20:20 UTC (permalink / raw)
  To: 38511

I use speedbar in Emacs, which relies on etags to generate tag files.
The Python source defines a macro named Py_LOCAL_INLINE, which is used
to select the appropriate spelling of "static inline":

#if defined(_MSC_VER)
...
#  define Py_LOCAL_INLINE(type) static __inline type __fastcall
#else
...
#  define Py_LOCAL_INLINE(type) static inline type
#endif

It's used like so:

Py_LOCAL_INLINE(void)
stackdepth_push(basicblock ***sp, basicblock *b, int depth)
{
    assert(b->b_startdepth < 0 || b->b_startdepth == depth);
    if (b->b_startdepth < depth && b->b_startdepth < 100) {
        assert(b->b_startdepth < 0);
        b->b_startdepth = depth;
        *(*sp)++ = b;
    }
}

It all works well. Etags though, thinks the file contains a function
named "Py_LOCAL_INLINE" and completely misses the actual function,
"stackdepth_push".

Seems like a bug to me, but it's not obvious if there is a trivial
fix. As a workaround, I think I can write a little shell script which
effectively expands the Py_LOCAL_INLINE macro, then pumps the result
to etags. Still, would be kind of nice if this could be fixed.

Thanks,

Skip Montanaro





^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2021-08-31  2:05 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2019-12-06 20:20 bug#38511: etags seems to be confused by macros Skip Montanaro
2019-12-07  7:14 ` Eli Zaretskii
2019-12-09 10:59   ` Francesco Potortì
2019-12-09 12:39     ` Skip Montanaro
2019-12-09 13:30       ` Francesco Potortì
2021-08-31  2:05     ` Lars Ingebrigtsen

Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.