global function recognized with file scope (C)
Brought to you by:
dhiebert
ctags detects global function prototypes with file scope.
The definition is detected correctly though...
example code:
------------------------------------
int func(int i);
int main ()
{
return 0;
}
int func(int i)
{
return i+1;
}
------------------------------------
ctags output:
------------------------------------
func test_func.c /^int func(int i);$/;" p line:1 file: signature:(int i)
main test_func.c /^int main ()$/;" f line:4
func test_func.c /^int func(int i)$/;" f line:9 signature:(int i)
example code
I just noticed, that this only happens if it's a *.c file.
If i save the same code in a *.h file, the function is recognized as global correctly.
But also, if i declare one of the functions in *.h file static, it's still recognized as global. I know it's unusual to declare functions in a *.h file static but it's a bug after all, isn't it?