[Top][All Lists]

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

Re: Help etags parse lisp.h

From: Eli Zaretskii
Subject: Re: Help etags parse lisp.h
Date: Sun, 20 Mar 2016 20:11:36 +0200

> Date: Sun, 20 Mar 2016 19:59:28 +0200
> From: Eli Zaretskii <address@hidden>
> Cc: address@hidden
> 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
> this:
>   void foo (int arg1) int arg2; { bar = baz; }
> Or is this invalid C?  If so, perhaps we could take note of nonempty
> argument list.

Actually, the K&R style is this:

  void foo (arg1, arg2) TYPE1 arg1; TYPE2 arg2; { body... }

So the only way to discern between this and what we have in lisp.h is
to find data type keywords inside the parentheses (hoping they are not
hidden by some other macro).

reply via email to

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