Bug 151390

Summary: etags fails to generate tags under some conditions
Product: [Fedora] Fedora Reporter: David L. <idht4n>
Component: emacsAssignee: Jens Petersen <petersen>
Status: CLOSED UPSTREAM QA Contact:
Severity: medium Docs Contact:
Priority: medium    
Version: 3Keywords: MoveUpstream
Target Milestone: ---   
Target Release: ---   
Hardware: i386   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2005-10-03 08:24:05 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description David L. 2005-03-17 15:27:48 UTC
From Bugzilla Helper:
User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.7.5) Gecko/20041111 Firefox/1.0

Description of problem:
etags doesn't create a tag for main in the following program:

#define TCL_DONT_WAIT		(1<<1)

int Tcl_DoOneEvent(int a)
{
  return 0;
}

void MainLoop()
{
  while (Tcl_DoOneEvent(TCL_DONT_WAIT)!=0) {
  }
}


int main(int argc, char *argv[])
{

}


Version-Release number of selected component (if applicable):
emacs 21.3

How reproducible:
Always

Steps to Reproduce:
1. Paste the example code above into a file named foo.cc
2. execute "etags foo.cc"
3. execute "grep main TAGS" and see no tag for main
  

Actual Results:  No tag generated for main.

Expected Results:  A tag should be generated for main.

Additional info:

It also didn't work in redhat9.  It does work if the while (Tcl...) loop is removed.

Comment 1 Jens Petersen 2005-04-08 07:14:52 UTC
Happens with etags in current cvs emacs also.

Comment 2 David L. 2005-04-08 13:21:44 UTC
I also reported the problem to the emacs bug report email... here's what they
had to say:

Dear David, the etags distributed with Emacs 21.3 is more than three
years old, and has some bugs that are corrected in the newest version,
which is not officially released with Emacs yet.

In the example that you report you are even lucky, because on the same
test case the 21.3 etags dumps core on my box :-)

I suggest you download
<ftp://fly.isti.cnr.it/pub/software/unix/etags.tar.gz>, where you will
find the latest etags.c and man page together with a precompiled static
binary for Linux.

Comment 3 Jens Petersen 2005-05-18 02:52:40 UTC
Latest etags was added in emacs-21.4-2.

Is it any better now?

Comment 4 David L. 2005-05-22 14:50:31 UTC
How do I get that version?  I'm "up2date" on FC3 and I still get:
emacs --version
GNU Emacs 21.3.1

I've done a search of the redhat web site and of rpmfind for emacs-21.4-2 and
haven't found anything.


Comment 5 Jens Petersen 2005-05-23 00:35:17 UTC
You can find it in a local "rawhide" (Fedora Core development) mirror,
or is you have to from:
http://download.fedora.redhat.com/pub/fedora/linux/core/development/i386/Fedora/RPMS/

Alternatively you could just download the latest etags yourself,
build it and test it: it is a small program.