Improper parsing of statics

View: New views
1 Messages — Rating Filter:   Alert me  

Improper parsing of statics

by jds-2 :: Rate this Message:

| View Threaded | Show Only this Message

Some parts of this message have been removed. Learn more about Nabble's security policy.
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

_______________________________________________
Bug-cflow mailing list
Bug-cflow@...
http://lists.gnu.org/mailman/listinfo/bug-cflow