[Uml-devel] [Bug 86958] umbrello 1.3 beta c++ parser segfaults on simple class

martin mv123q3 at hotmail.com
Sun Sep 5 00:12:00 UTC 2004


------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.
        
http://bugs.kde.org/show_bug.cgi?id=86958        




------- Additional Comments From mv123q3 hotmail com  2004-09-05 04:48 -------
Yes, I also encountered this problem. After litle examination I solved it.
The problem is when some token with semicolon is after closing bracket of member function of class, structure or union.
Another example is 
class A {
public:
    void member() { a=1;}; //comment
};

this patch will do it:

--- parser.cpp  2004-08-10 23:02:56.000000000 +0000
+++ parser-new.cpp      2004-09-05 02:30:16.780647000 +0000
 @ -1866,7 +1866,7  @
        if( lex->lookAhead(0) == '}' )
            break;

-       DeclarationAST::Node memSpec;
+       DeclarationAST::Node memSpec = CreateNode<DeclarationAST>() ;
        int startDecl = lex->index();
        if( !parseMemberSpecification(memSpec) ){
            if( startDecl == lex->index() )

enjoy!!!

martin




More information about the umbrello-devel mailing list