Menu

"AST broken, 'switch' doesn't have two operands." due to recent commits

Martin
2021-01-05
2021-05-06
  • Martin

    Martin - 2021-01-05

    Hi,

    I've recently updated my local cppcheck to the latest main branch:
    old commit: ab3614b4e2ce42d22d4714c5ea4908f06b46fa01
    new commit: 018d033af353ae922b3683d1854f785a010866f6

    Now the following issue occurs (file is attached):

    ./cppcheck /home/user/Desktop/ex5.cpp
    Checking /home/user/Desktop/ex5.cpp ...
    /home/user/Desktop/ex5.cpp:5:17: error: Syntax Error: AST broken, 'switch' doesn't have two operands. [internalAstError]
    switch (bw)
    ^

    Could you please check?

    Best regards,
    Martin

     
  • Daniel Marjamäki

    Thanks! I can reproduce. I have created https://trac.cppcheck.net/ticket/10079

     
  • Martin

    Martin - 2021-05-06

    It's fixed now. thanks.

     

Log in to post a comment.

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.