From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Francesco Potorti` Newsgroups: gmane.emacs.bugs Subject: Re: etags: function not indexed after macro Date: Tue, 23 May 2006 13:11:41 +0200 Organization: ISTI-CNR, via Moruzzi 1, I-56124 Pisa, +39-0503153058 Message-ID: NNTP-Posting-Host: main.gmane.org X-Trace: sea.gmane.org 1148383851 10333 80.91.229.2 (23 May 2006 11:30:51 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Tue, 23 May 2006 11:30:51 +0000 (UTC) Cc: bug-gnu-emacs@gnu.org Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Tue May 23 13:30:45 2006 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by ciao.gmane.org with esmtp (Exim 4.43) id 1FiV64-0001oF-JC for geb-bug-gnu-emacs@m.gmane.org; Tue, 23 May 2006 13:30:44 +0200 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1FiV64-0008GU-3c for geb-bug-gnu-emacs@m.gmane.org; Tue, 23 May 2006 07:30:44 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1FiUnt-00081D-Hg for bug-gnu-emacs@gnu.org; Tue, 23 May 2006 07:11:57 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1FiUns-0007ze-Dc for bug-gnu-emacs@gnu.org; Tue, 23 May 2006 07:11:57 -0400 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1FiUns-0007zS-42 for bug-gnu-emacs@gnu.org; Tue, 23 May 2006 07:11:56 -0400 Original-Received: from [146.48.83.182] (helo=pot.isti.cnr.it) by monty-python.gnu.org with esmtp (Exim 4.52) id 1FiUs4-0002re-K3 for bug-gnu-emacs@gnu.org; Tue, 23 May 2006 07:16:16 -0400 Original-Received: from pot by pot.isti.cnr.it with local (Exim 3.36 #1 (Debian)) id 1FiUnd-00015r-00; Tue, 23 May 2006 13:11:41 +0200 Original-To: Roman Pletka In-reply-to: "rap@zurich.ibm.com"'s message of Fri, 12 May 2006 10:53:44 +0200 Original-References: X-fingerprint: 4B02 6187 5C03 D6B1 2E31 7666 09DF 2DC9 BE21 6115 X-Mailman-Approved-At: Tue, 23 May 2006 07:30:37 -0400 X-BeenThere: bug-gnu-emacs@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.bugs:15109 Archived-At: Dear Roman, the etags bug that you signaled: >#define DECLARE_TEST(name) \ > static int test_##name; > >DECLARE_TEST(var) > > > >void my_func(int i) { > test_var = i; >} > >void my_func2(int j) { > test_var = j; >} > > >It looks like etags does not create an entry for the my_func function because >the closing semicolon is in the definition of the macro. I am using etags that >comes with GNU Emacs 21.4 (Debian emacs21 21.4a-3). I tried the same code with >cscope and there it works. as Eli Zaretskii correctly explains, has an easy and recommended workaround. I will try nonetheless to correct the bug, but I am not sure if this can be done, because of the way the etags parser is implemented. Do you have any strong reasons why you should use this style ================ #define DECLARE_TEST(name) static int test_##name; DECLARE_TEST(var) ================ rather than this style? ================ #define DECLARE_TEST(name) static int test_##name DECLARE_TEST(var); ================ Thank for your bug report, and please try to answer my question.