Menu

Regression in 2.19: internalAstError when parsing if-condition

2026-01-07
2026-01-07
  • Frank Winklmeier

    With cppcheck 2.19.0, I see the following regression:

    void f1(Foo* foo) {
      double d = 0;
      if (d!=-99. and foo->func() < 10 ) {}
    }
    
    test.cxx:3:19: error: Syntax Error: AST broken, 'foo' doesn't have a parent. [internalAstError]
      if (d!=-99. and foo->func() < 10 ) {}
                      ^
    

    Change the 99. to 99 or 99.0 or and to && and the error goes away.

     
  • CHR

    CHR - 2026-01-07

    Thanks for reporting, ticket is here: https://trac.cppcheck.net/ticket/14368

     

Log in to post a comment.