Menu

#385 Initialized structure instances breaks code completion

Undefined
duplicate
nobody
Bug_Report
2021-08-15
2016-07-18
raynebc
No

As of the latest nightly build of Codeblocks (6-21-2016) on Windows 7 x64, if a structure is declared and initialized on the same line, such as the following:

struct mystruct{
    unsigned myvar;
};

int main(void)
{
    struct mystruct myinstance = {1};
}

Right clicking on any reference to "myinstance" (even on the line where it is defined) and asking CodeBlocks to find the declaration for that structure results in a "Not found" result. If the initialization is taken out and left as "struct mystruct;", then C::B is immediately able to find the declaration.

Discussion

  • ollydbg

    ollydbg - 2016-07-20
    • labels: --> CodeCompletion
     
  • ollydbg

    ollydbg - 2016-09-11
    • labels: CodeCompletion --> CodeCompletion, C++11
     
  • raynebc

    raynebc - 2016-09-30

    I'm not able to reproduce this in the 9-25-2016 nightly, it might be fixed.

     
  • ollydbg

    ollydbg - 2016-10-02

    Strange, if I remember correct, I haven't fixed this issue, but maybe this issue is fixed by other cc commits.

     
  • raynebc

    raynebc - 2016-10-02

    I tried a couple of offending variables in my code side by side with the previous nightly and the behavior certainly seems to have changed for the better. I won't look a gift commit in the mouth!

     
  • Andrew Cottrell

    Andrew Cottrell - 2021-06-27

    See ticket 33 for potential fix.

     
  • Teodor Petrov

    Teodor Petrov - 2021-08-15
    • status: open --> duplicate
     
  • Teodor Petrov

    Teodor Petrov - 2021-08-15

    Duplicate of [#33]

     

    Related

    Tickets: #33


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.