From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Alexandru Harsanyi Newsgroups: gmane.emacs.devel,gmane.emacs.pretest.bugs Subject: etags does not recognize function definition in C file Date: Wed, 14 Nov 2007 17:53:10 +0900 Message-ID: <0DFBDD07-237A-40D6-89A6-78050F0FF523@mac.com> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 (Apple Message framework v752.2) Content-Type: text/plain; charset=US-ASCII; delsp=yes; format=flowed Content-Transfer-Encoding: 7bit X-Trace: ger.gmane.org 1195030489 5837 80.91.229.12 (14 Nov 2007 08:54:49 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Wed, 14 Nov 2007 08:54:49 +0000 (UTC) To: emacs-pretest-bug@gnu.org Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Wed Nov 14 09:54:54 2007 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.50) id 1IsE1N-0001nT-Uf for ged-emacs-devel@m.gmane.org; Wed, 14 Nov 2007 09:54:54 +0100 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1IsE1B-00053k-HH for ged-emacs-devel@m.gmane.org; Wed, 14 Nov 2007 03:54:41 -0500 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1IsDzz-0003D6-2Z for emacs-devel@gnu.org; Wed, 14 Nov 2007 03:53:27 -0500 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1IsDzy-0003BZ-3w for emacs-devel@gnu.org; Wed, 14 Nov 2007 03:53:26 -0500 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1IsDzx-0003BR-Vq for emacs-devel@gnu.org; Wed, 14 Nov 2007 03:53:26 -0500 Original-Received: from fencepost.gnu.org ([140.186.70.10]) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1IsDzx-0006lq-KM for emacs-devel@gnu.org; Wed, 14 Nov 2007 03:53:25 -0500 Original-Received: from mx10.gnu.org ([199.232.76.166]) by fencepost.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1IsDzx-0008Q4-70 for emacs-pretest-bug@gnu.org; Wed, 14 Nov 2007 03:53:25 -0500 Original-Received: from Debian-exim by monty-python.gnu.org with spam-scanned (Exim 4.60) (envelope-from ) id 1IsDzt-0006kg-LD for emacs-pretest-bug@gnu.org; Wed, 14 Nov 2007 03:53:25 -0500 Original-Received: from hosted05.westnet.com.au ([203.10.1.219]) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1IsDzs-0006gD-Pl for emacs-pretest-bug@gnu.org; Wed, 14 Nov 2007 03:53:21 -0500 Original-Received: from hosted05.westnet.com.au (hosted05.westnet.com.au [127.0.0.1]) by hosted05.westnet.com.au (Postfix) with SMTP id 43B243F0684 for ; Wed, 14 Nov 2007 17:53:07 +0900 (WST) Original-Received: from [10.0.1.2] (dsl-58-7-123-41.wa.westnet.com.au [58.7.123.41]) (using TLSv1 with cipher AES128-SHA (128/128 bits)) (No client certificate requested) by hosted05.westnet.com.au (Postfix) with ESMTP id 29B243F126C for ; Wed, 14 Nov 2007 17:53:05 +0900 (WST) X-Mailer: Apple Mail (2.752.2) X-PMX-Branch: TNG-Outgoing X-detected-kernel: by monty-python.gnu.org: Linux 2.6, seldom 2.4 (older, 4) X-detected-kernel: by monty-python.gnu.org: Linux 2.6, seldom 2.4 (older, 4) X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:83173 gmane.emacs.pretest.bugs:20278 Archived-At: This is actually a bug in the etags program not emacs. For the following C file: ----- #include int flag = 1; void foo() { if (flag) { // bar(); } } void bar() { printf("bar\n"); } void baz() { printf("baz\n"); } ----- If I generate a TAGS file using the command: etags tags_bug.c the resulting TAGS file will not contain an entry for the 'bar' function. I believe this is caused by the empty if block in the 'foo' function. If I uncomment that line, the TAGS file will contain an entry for 'bar'. Best Regards, Alex. In GNU Emacs 22.1.50.2 (powerpc-apple-darwin8.9.0, Carbon Version 1.6.0) of 2007-06-09 on karinji.local Windowing system distributor `Apple Inc.', version 10.4.10 configured using `configure '--enable-carbon-app'' Important settings: value of $LC_ALL: nil value of $LC_COLLATE: nil value of $LC_CTYPE: nil value of $LC_MESSAGES: nil value of $LC_MONETARY: nil value of $LC_NUMERIC: nil value of $LC_TIME: nil value of $LANG: nil locale-coding-system: iso-8859-1 default-enable-multibyte-characters: t Major mode: C/lw Minor modes in effect: whitespace-mode: t shell-dirtrack-mode: t c-subword-mode: t encoded-kbd-mode: t show-paren-mode: t global-cwarn-mode: t cwarn-mode: t display-time-mode: t whitespace-global-mode: t mouse-wheel-mode: t menu-bar-mode: t file-name-shadow-mode: t global-font-lock-mode: t font-lock-mode: t unify-8859-on-encoding-mode: t utf-translate-cjk-mode: t auto-compression-mode: t line-number-mode: t transient-mark-mode: identity abbrev-mode: t Recent input: C-c t C-a C-x C-f ~ / O t h t a g s _ b u g . c c C-x C-v C-e C-y C-x C-s C-x C-s M-x s h e l l M-x c d o b l s SPC - l t a g s / o p t e m u s l o b i n e t t a g l SPC s - l s SPC - l C-x C-f T A G C-x b C-s C-a C-e b a r C-x C-s C-a C-d C-d C-x C-s C-x C-s C-x b C-s g C-g C-x b C-s M-p M-p C-x C-f T A G y e s C-x b C-x b C-s C-a / / C-x C-s C-x b M-p C-x C-b x C-x 1 C-x b C-g C-x C-f T A G y e s C-x b C-x b C-s M-x r e p o r e m Recent messages: Partially completed Wrote /Users/haral/Other/tags_bug.c [2 times] (No changes need to be saved) Quit History item: 1 History item: 2 Wrote /Users/haral/Other/tags_bug.c History item: 1 Quit Loading emacsbug...done