Menu

Token::astOperand2() cyclic dependency

Martin
2021-01-19
2021-05-10
  • Martin

    Martin - 2021-01-19

    Hi,

    the latest cppcheck (main branch) produces this error (file attached):

    ./cppcheck /home/user/Desktop/ex2_1.cpp
    Checking /home/user/Desktop/ex2_1.cpp ...
    /home/user/Desktop/ex2_1.cpp:3:18: error: Internal error. Token::astOperand2() cyclic dependency. [cppcheckError]
    static_assert(sizeof(std::underlying_type<level>::type) >= sizeof(decltype(level))
    ^</level>

    Could you please check?

    Best regards,
    Martin

     
  • Martin

    Martin - 2021-05-06

    Similar internal errors occur for:

    static_assert(sizeof(std::underlying_type<Level>::type) >= sizeof(decltype(level))
                     , "Conversion to Level will not fit");
    

    and

    static_assert(sizeof(decltype(*(toSerialize.begin()))) <= sizeof(uint8_t),
             "toSerialize CharT (which should be char) is bigger than uint8_t...");
    
     
    • Daniel Marjamäki

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

       
      • Daniel Marjamäki

        This problem has been fixed now.

         
  • Martin

    Martin - 2021-05-10

    I can confirm, 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.