[llvm-bugs] [Bug 38112] New: -Wuninitialized ignored if type is "const" pointer
via llvm-bugs
llvm-bugs at lists.llvm.org
Mon Jul 9 14:55:05 PDT 2018
https://bugs.llvm.org/show_bug.cgi?id=38112
Bug ID: 38112
Summary: -Wuninitialized ignored if type is "const" pointer
Product: clang
Version: trunk
Hardware: All
OS: All
Status: NEW
Severity: normal
Priority: P
Component: Frontend
Assignee: unassignedclangbugs at nondot.org
Reporter: pickensd at synopsys.com
CC: llvm-bugs at lists.llvm.org
Compile the following with '-Wuninitialized' and clang fails to diagnose the
uninitialized variable.
------------------- test.c -----------------------
extern void foo(const char *p);
int main(){
char *p;
foo(p); // Should produce warning but doesn't
}
---------------------------------------
If "const" is removed from the parameter to "foo", the warning is emitted as
expected.
--
You are receiving this mail because:
You are on the CC list for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-bugs/attachments/20180709/69ee71fe/attachment.html>
More information about the llvm-bugs
mailing list