public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c/27120] New: Should warn about uninitialized use of variable array element
@ 2006-04-11 15:56 rguenth at gcc dot gnu dot org
2006-04-11 17:30 ` [Bug c/27120] " pinskia at gcc dot gnu dot org
` (2 more replies)
0 siblings, 3 replies; 5+ messages in thread
From: rguenth at gcc dot gnu dot org @ 2006-04-11 15:56 UTC (permalink / raw)
To: gcc-bugs
int foo(int i)
{
char buffer[10];
return buffer[i];
}
does not warn about the use of uninitialized array buffer. While
int foo(int i)
{
char buffer[10];
return buffer[2];
}
does. Likewise for C++.
--
Summary: Should warn about uninitialized use of variable array
element
Product: gcc
Version: 4.2.0
Status: UNCONFIRMED
Keywords: diagnostic
Severity: enhancement
Priority: P3
Component: c
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: rguenth at gcc dot gnu dot org
OtherBugsDependingO 24639
nThis:
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=27120
^ permalink raw reply [flat|nested] 5+ messages in thread
* [Bug c/27120] Should warn about uninitialized use of variable array element
2006-04-11 15:56 [Bug c/27120] New: Should warn about uninitialized use of variable array element rguenth at gcc dot gnu dot org
@ 2006-04-11 17:30 ` pinskia at gcc dot gnu dot org
2006-04-30 7:47 ` pinskia at gcc dot gnu dot org
2009-03-28 13:40 ` fxcoudert at gcc dot gnu dot org
2 siblings, 0 replies; 5+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2006-04-11 17:30 UTC (permalink / raw)
To: gcc-bugs
------- Comment #1 from pinskia at gcc dot gnu dot org 2006-04-11 17:30 -------
Related to PR 10138.
--
pinskia at gcc dot gnu dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
BugsThisDependsOn| |10138
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=27120
^ permalink raw reply [flat|nested] 5+ messages in thread
* [Bug c/27120] Should warn about uninitialized use of variable array element
2006-04-11 15:56 [Bug c/27120] New: Should warn about uninitialized use of variable array element rguenth at gcc dot gnu dot org
2006-04-11 17:30 ` [Bug c/27120] " pinskia at gcc dot gnu dot org
@ 2006-04-30 7:47 ` pinskia at gcc dot gnu dot org
2009-03-28 13:40 ` fxcoudert at gcc dot gnu dot org
2 siblings, 0 replies; 5+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2006-04-30 7:47 UTC (permalink / raw)
To: gcc-bugs
------- Comment #2 from pinskia at gcc dot gnu dot org 2006-04-30 07:47 -------
(In reply to comment #0)
[first testcase using nonconstant index]
>
> does not warn about the use of uninitialized array buffer. While
>
[second testcase using constant index]
>
> does. Likewise for C++.
In the second example, SRA works on the array, scalarizes the array which
allows for the current initialization warning to happen. Now maybe we should
do the uninitialization warning in the front-end.
--
pinskia at gcc dot gnu dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|UNCONFIRMED |NEW
Ever Confirmed|0 |1
Last reconfirmed|0000-00-00 00:00:00 |2006-04-30 07:47:20
date| |
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=27120
^ permalink raw reply [flat|nested] 5+ messages in thread
* [Bug c/27120] Should warn about uninitialized use of variable array element
2006-04-11 15:56 [Bug c/27120] New: Should warn about uninitialized use of variable array element rguenth at gcc dot gnu dot org
2006-04-11 17:30 ` [Bug c/27120] " pinskia at gcc dot gnu dot org
2006-04-30 7:47 ` pinskia at gcc dot gnu dot org
@ 2009-03-28 13:40 ` fxcoudert at gcc dot gnu dot org
2 siblings, 0 replies; 5+ messages in thread
From: fxcoudert at gcc dot gnu dot org @ 2009-03-28 13:40 UTC (permalink / raw)
To: gcc-bugs
------- Comment #3 from fxcoudert at gcc dot gnu dot org 2009-03-28 13:39 -------
*** Bug 35234 has been marked as a duplicate of this bug. ***
--
fxcoudert at gcc dot gnu dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |dominiq at lps dot ens dot
| |fr
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=27120
^ permalink raw reply [flat|nested] 5+ messages in thread
* [Bug c/27120] Should warn about uninitialized use of variable array element
[not found] <bug-27120-4@http.gcc.gnu.org/bugzilla/>
@ 2015-08-12 11:15 ` mpolacek at gcc dot gnu.org
0 siblings, 0 replies; 5+ messages in thread
From: mpolacek at gcc dot gnu.org @ 2015-08-12 11:15 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=27120
Marek Polacek <mpolacek at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|NEW |RESOLVED
CC| |mpolacek at gcc dot gnu.org
Resolution|--- |FIXED
--- Comment #4 from Marek Polacek <mpolacek at gcc dot gnu.org> ---
We now warn even for the first testcase in Description (both C and C++).
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2015-08-12 11:15 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2006-04-11 15:56 [Bug c/27120] New: Should warn about uninitialized use of variable array element rguenth at gcc dot gnu dot org
2006-04-11 17:30 ` [Bug c/27120] " pinskia at gcc dot gnu dot org
2006-04-30 7:47 ` pinskia at gcc dot gnu dot org
2009-03-28 13:40 ` fxcoudert at gcc dot gnu dot org
[not found] <bug-27120-4@http.gcc.gnu.org/bugzilla/>
2015-08-12 11:15 ` mpolacek at gcc dot gnu.org
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).