Menu

cppcheck head: new syntax error

Martin
2022-02-07
2022-02-08
  • Martin

    Martin - 2022-02-07

    Hi,

    with
    f2a419653cecc19e1c1a0cae6bb9016725e0f2a1
    there's a new syntax error:

    foo::foo()
    : m_bar{(x > 0) ? new uint32_t[x]{} : new uint32_t[1]{}},
    {}
    

    Output is:

    error: Syntax Error: AST broken, ternary operator lacks ':'. [internalAstError]
    : m_bar{(x > 0) ? new uint32_t[x]{} : new uint32_t[1]{}},
    

    Could you please check?

    Thanks,
    Martin

     
  • CHR

    CHR - 2022-02-08

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

     

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.