Menu

Broken AST due to designated initializer

NRK
2022-05-04
2022-05-05
  • NRK

    NRK - 2022-05-04

    Here's a snippet to reproduce the issue, tested on cppcheck v2.6.3.

    int x = (int []) { [0] = 0, }[0];
    
    test.c:1:7: error: Syntax Error: AST broken, binary operator '=' doesn't have two operands. [internalAstError]
    int x = (int []) { [0] = 0, }[0];
          ^
    
     
  • CHR

    CHR - 2022-05-05

    Thanks for reporting, this ticket seems to cover the problem: https://trac.cppcheck.net/ticket/10177

     

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.