Menu

#59 c++ style comments handled incorrectly

closed-fixed
None
5
2001-08-27
2001-08-26
Anonymous
No

void
Foo_Copy(char *a, // IN
char *b) // OUT
{
}

Then in cscope enter Foo_Copy in "Find this global
definition": and it can't.

defining COMMENTS_BY_FLEX to zero in fscanner.l
solves this problem.

Discussion

  • Hans-Bernhard Broeker

    • assigned_to: nobody --> broeker
     
  • Hans-Bernhard Broeker

    Logged In: YES
    user_id=27517

    That problem is a hard one. Distinguishing function calls
    from function declarations, and both from function
    definitions, is quite hard enough already. Comments in the
    middle of an argument list can make it impossible.

    The reason the earlier version worked better is that it's a
    two-pass approach: it removes comments, first, and then
    looks for syntactical elements. COMMENTS_BY_FLEX does both
    in one pass, which causes additional problems.

    I'll see what can be done about it.

     
  • Hans-Bernhard Broeker

    Logged In: YES
    user_id=27517

    Fix checked in. CAUTION: I didn't run tests against C++
    sources to see if it breaks something elsewhere.

     
  • Hans-Bernhard Broeker

    • status: open --> closed-fixed
     

Log in to post a comment.