This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug middle-end/10138] warn for uninitialized arrays passed as const* arguments
- From: "msebor at gcc dot gnu.org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Tue, 06 Sep 2016 23:45:49 +0000
- Subject: [Bug middle-end/10138] warn for uninitialized arrays passed as const* arguments
- Auto-submitted: auto-generated
- References: <bug-10138-4@http.gcc.gnu.org/bugzilla/>
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=10138
--- Comment #26 from Martin Sebor <msebor at gcc dot gnu.org> ---
It seems that it should be possible to enhance the warn_uninitialized_vars
function in tree-ssa-uninit.c to detect this case by iterating over a callee's
arguments and warn on uninitialized variables whose address is passed to it via
a const pointer parameter.