emacs-devel
[Top][All Lists]
Advanced

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

etags does not recognize function definition in C file


From: Alexandru Harsanyi
Subject: etags does not recognize function definition in C file
Date: Wed, 14 Nov 2007 17:53:10 +0900

This is actually a bug in the etags program not emacs. For the following C
file:

-----
#include <stdio.h>

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:
<mouse-1> <mouse-1> <mouse-1> <mouse-1> <mouse-1> <mouse-1>
<mouse-1> <mouse-1> <mouse-1> <mouse-1> <down-mouse-1>
<mouse-movement> <mouse-1> <down-mouse-1> <mouse-1>
<down-mouse-1> <mouse-1> C-c t C-a <down-mouse-1> <mouse-1>
<down-mouse-1> <mouse-1> <down-mouse-1> <mouse-1> <down-mouse-1>
<mouse-1> <down-mouse-1> <mouse-1> <down-mouse-1> <mouse-movement>
<mouse-1> <down-mouse-1> <mouse-1> <down-mouse-1> <mouse-movement>
<mouse-1> <down-mouse-1> <mouse-movement> <mouse-1>
<down-mouse-1> <mouse-1> <down-mouse-1> <mouse-movement>
<mouse-1> <down-mouse-1> <mouse-1> C-x C-f ~ / O t
h <tab> t a g s _ b u g . c c <return> C-x C-v C-e
<backspace> <return> C-y C-x C-s <return> C-x C-s M-x
s h e l l <return> M-x c d o b <return> <return> l
s SPC - l <return> t a g s <backspace> <backspace>
<backspace> <backspace> / o p t <tab> e m <backspace>
<backspace> <backspace> <backspace> <backspace> <backspace>
u s <tab> l o <tab> b i n <tab> e t <tab> t a g <tab>
<return> l SPC s - l <backspace> <backspace> <backspace>
<backspace> s SPC - l <return> C-x C-f T A G <tab>
<return> <down> <down> <down> <down> <up> <down> <down>
<down> C-x b C-s <return> <up> <down> <up> <up> <up>
<up> <up> <up> <up> <up> <up> <up> <up> <up> <up> <right>
<right> <right> <up> <up> <up> <up> <up> <down> <down>
<down> <down> <down> C-a C-e <left> <left> <left> <C-backspace>
b a r C-x C-s C-a C-d C-d C-x C-s <tab> C-x C-s C-x
b C-s <C-return> <C-return> g C-g C-x b C-s <return>
M-p M-p <return> C-x C-f T A G <tab> <return> y e s
<return> C-x b <return> C-x b C-s <return> <up> <down>
C-a / / C-x C-s C-x b <return> M-p <return> C-x C-b
x <backspace> C-x 1 C-x b C-g C-x C-f T A G <tab> <return>
y e s <return> C-x b <return> C-x b C-s <return> M-x
r e p o r <tab> e m <tab> <return>

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




reply via email to

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