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: unassignedclangb...@nondot.org
          Reporter: felix-l...@fefe.de
                CC: blitzrak...@gmail.com, dgre...@apple.com,
                    erik.pilking...@gmail.com, llvm-bugs@lists.llvm.org,
                    richard-l...@metafoo.co.uk

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
llvm-bugs@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs

Reply via email to