Hacker News new | ask | show | jobs
by barrkel 4125 days ago
What evidence do you have that it's an uninitialized variable?

It's a code fragment; it's not in a function body. The way I read it, it was simply to document the type of x. 'x' could be a global for all we know.

1 comments

My evidence is that the entire page is basically just to shows CIL's output on various pieces of code, and CIL's output is linked on the page and looks like this:

    /* Generated by CIL v. 1.3.7 */
    /* print_CIL_Input is true */

    #line 1 "cilcode.tmp/ex30.c"
    int main(void) 
    { int x ;

      {
    #line 2
      return (x == (x != 0));
    }
    }
From that I think it's safe to say that it's talking about 'x' being an uninitialized variable in a function (Because that's what they put into CIL). This code definitely has the issue from UB that I described above.