[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Help etags parse lisp.j

From: Eli Zaretskii
Subject: Re: Help etags parse lisp.j
Date: Sun, 20 Mar 2016 19:59:28 +0200

> From: Andreas Schwab <address@hidden>
> Cc: address@hidden
> Date: Sun, 20 Mar 2016 18:34:05 +0100
> >   extern _Noreturn void emacs_abort (void) NO_INLINE;
> >
> > Specifically, the very next inline function doesn't wind up in TAGS.
> > The problem is that NO_INLINE part after the argument list.  These
> > macros expand either to __attribute__((SOMETHING)) or to nothing;
> > etags knows about __attribute__, but it cannot know about the macros
> > we use for that.  The problem happens with any attribute we hide
> > behind a macro, not just with NO_INLINE.
> Can't etags reset its parser state after a toplevel semicolon?

No, evidently because it wants to support K&R function definition:

  void foo () int arg; { bar = arg; }

That's why, whenever it finds lines like the one above, it resets its
state only after the closing brace.

Hmm... can a function definition use mixed K&R and ANSI style, i.e.
some arguments declared inside the parentheses and some outside, like

  void foo (int arg1) int arg2; { bar = baz; }

Or is this invalid C?  If so, perhaps we could take note of nonempty
argument list.

reply via email to

[Prev in Thread] Current Thread [Next in Thread]