[Top][All Lists]

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

Index C function prototypes

From: Andrea Taverna
Subject: Index C function prototypes
Date: Mon, 07 Nov 2011 03:41:48 +0100
User-agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv: Gecko/20080501 Fedora/ Thunderbird/ Mnenhy/

OS: Fedora Core 15 64 bit intel

Global version: global - GNU GLOBAL 5.9.3 (global-5.9.3-3.fc15.x86_64.rpm)

Goal: Say I have a C header file (*.h file) with some function prototypes. I want gtags to index such prototypes, but I can't actually get that to work

What I did:

$ mkdir foo && cd foo/
$ vi foo.h
$ gtags
$ global -vf foo.h

where foo.h contains
#ifndef FOO_H_
#define FOO_H_

void foo() ;

#endif /*FOO_H_*/

What I got
FOO_H_ 2 foo.h ...

What I expected
FOO_H_ 2 foo.h ...
foo   4 foo .h ...

It only works when I write a function definition, i.e. if I substitue the prototype with

void foo () {}

,even if I set GTAGSFORCECPP

What's missing?


Andrea Taverna

reply via email to

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