|
From: | jds |
Subject: | [Bug-cflow] Improper parsing of statics |
Date: | Thu, 02 Mar 2006 19:04:44 -0500 |
Hi;
I apologize if this gets posted twice. It's
not clear that the list server accepted my first post.
I'm finishing up a port of cflow to Windows, and
noticed a parsing problem. This appears to be a general parsing problem
rather than a Windows-specific issue.
If I parse multiple files having static data
members with the same name, cflow improperly reports redefinition of the static
member:
In multi1.c:
static int stat =
1;
...
In multi2.c:
static int stat =
10;
...
cflow 1.0 reports this as multiple definition of the same variable.
Since these are static to the different files, they are not the same variable
and should be recognized as distinct. Further, if a function in multi1.c
uses the variable 'stat', cflow will be attributed to the most recently parsed
file rather than it's own static variable. The same problem occurs
for same-name static variables declared in functions, whether they are in the
same or different files.
If you want me to send in a patch, please let me know.
Thanks,
Jerry |
[Prev in Thread] | Current Thread | [Next in Thread] |