This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug middle-end/33086] warn for read-only uninitialized variables passed as arguments
- From: "pinskia 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 14:58:23 -0000
- Subject: [Bug middle-end/33086] warn for read-only uninitialized variables passed as arguments
- References: <bug-33086-13511@http.gcc.gnu.org/bugzilla/>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
------- Comment #3 from pinskia at gcc dot gnu dot org 2007-08-16 14:58 -------
void use(const int *a)
{
int *b = (int*)a;
b[0] = 5;
}
void foo(void)
{
int i;
use(&i);
}
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=33086