From: Alexandru Harsanyi <harsanyi@mac.com>
To: emacs-pretest-bug@gnu.org
Subject: etags does not recognize function definition in C file
Date: Wed, 14 Nov 2007 17:53:10 +0900 [thread overview]
Message-ID: <0DFBDD07-237A-40D6-89A6-78050F0FF523@mac.com> (raw)
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
next reply other threads:[~2007-11-14 8:53 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-11-14 8:53 Alexandru Harsanyi [this message]
2007-11-15 8:28 ` etags does not recognize function definition in C file Masatake YAMATO
2007-11-15 12:16 ` Francesco Potorti`
2007-11-15 12:44 ` Masatake YAMATO
2007-11-16 8:06 ` Alexandru Harsanyi
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://www.gnu.org/software/emacs/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=0DFBDD07-237A-40D6-89A6-78050F0FF523@mac.com \
--to=harsanyi@mac.com \
--cc=emacs-pretest-bug@gnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this public inbox
https://git.savannah.gnu.org/cgit/emacs.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).