https://bugs.llvm.org/show_bug.cgi?id=48175

            Bug ID: 48175
           Summary: missing "uninitialized variable" warning when using
                    VLAs
           Product: clang
           Version: 11.0
          Hardware: PC
                OS: Linux
            Status: NEW
          Severity: normal
          Priority: P
         Component: C
          Assignee: [email protected]
          Reporter: [email protected]
                CC: [email protected], [email protected],
                    [email protected], [email protected],
                    [email protected]

Here is some sample code:

int foo(int n) {
  int foo[n];
  return foo[0];
}

Cheeky clang generates only a ret for this function. That's it.

I expected a warning that I am reading an uninitialized value in the return
statement.

-- 
You are receiving this mail because:
You are on the CC list for the bug.
_______________________________________________
llvm-bugs mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs

Reply via email to