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: "manu at gcc dot gnu dot org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 16 Aug 2007 10:57:17 -0000
- Subject: [Bug middle-end/10138] warn for uninitialized arrays passed as const* arguments
- References: <bug-10138-1038@http.gcc.gnu.org/bugzilla/>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
------- Comment #9 from manu at gcc dot gnu dot org 2007-08-16 10:57 -------
Let's simplify this report. This one is now about
int atoi(const char *);
int foo()
{
char buf[10];
return atoi(buf);
}
As comment #3 mentions, this is a combination of
1) Report use of uninitialized array elements (PR27120).
2) Report pointers to uninitialized variables passed as const* arguments
(PR33086).
I guess that if we achieve both things, we will have a chance to achieve this
one. In other words, both PRs are blocking this one.
--
manu at gcc dot gnu dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |manu at gcc dot gnu dot org
BugsThisDependsOn| |27120
OtherBugsDependingO|27120 |
nThis| |
Summary|-Wuninitialized could catch |warn for uninitialized
|uninitialized arrays |arrays passed as const*
| |arguments
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=10138