public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c/22546] New: does not warn for out-of-bound array access
@ 2005-07-18 13:45 rguenth at gcc dot gnu dot org
  2005-07-18 13:46 ` [Bug c/22546] " pcarlini at suse dot de
                   ` (2 more replies)
  0 siblings, 3 replies; 4+ messages in thread
From: rguenth at gcc dot gnu dot org @ 2005-07-18 13:45 UTC (permalink / raw)
  To: gcc-bugs

void foo(void)
{
  int i[2];
  i[2] = 0;
  i[3] = 0;
}

does not get warned on, even with -Wall.  This might catch some subtle
bugs in gcc itself.

-- 
           Summary: does not warn for out-of-bound array access
           Product: gcc
           Version: 4.1.0
            Status: UNCONFIRMED
          Keywords: diagnostic
          Severity: normal
          Priority: P2
         Component: c
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: rguenth at gcc dot gnu dot org
                CC: gcc-bugs at gcc dot gnu dot org


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=22546


^ permalink raw reply	[flat|nested] 4+ messages in thread

* [Bug c/22546] does not warn for out-of-bound array access
  2005-07-18 13:45 [Bug c/22546] New: does not warn for out-of-bound array access rguenth at gcc dot gnu dot org
@ 2005-07-18 13:46 ` pcarlini at suse dot de
  2005-07-18 14:02 ` pinskia at gcc dot gnu dot org
  2005-07-18 14:02 ` pcarlini at suse dot de
  2 siblings, 0 replies; 4+ messages in thread
From: pcarlini at suse dot de @ 2005-07-18 13:46 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From pcarlini at suse dot de  2005-07-18 13:45 -------
How does this relate to mudflap?!?

-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=22546


^ permalink raw reply	[flat|nested] 4+ messages in thread

* [Bug c/22546] does not warn for out-of-bound array access
  2005-07-18 13:45 [Bug c/22546] New: does not warn for out-of-bound array access rguenth at gcc dot gnu dot org
  2005-07-18 13:46 ` [Bug c/22546] " pcarlini at suse dot de
@ 2005-07-18 14:02 ` pinskia at gcc dot gnu dot org
  2005-07-18 14:02 ` pcarlini at suse dot de
  2 siblings, 0 replies; 4+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2005-07-18 14:02 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From pinskia at gcc dot gnu dot org  2005-07-18 14:02 -------
(In reply to comment #1)
> How does this relate to mudflap?!?

Compile time vs runtime warnings.
This is also a dup of bug 8268.


*** This bug has been marked as a duplicate of 8268 ***

*** This bug has been marked as a duplicate of 8268 ***

-- 
           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |RESOLVED
         Resolution|                            |DUPLICATE


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=22546


^ permalink raw reply	[flat|nested] 4+ messages in thread

* [Bug c/22546] does not warn for out-of-bound array access
  2005-07-18 13:45 [Bug c/22546] New: does not warn for out-of-bound array access rguenth at gcc dot gnu dot org
  2005-07-18 13:46 ` [Bug c/22546] " pcarlini at suse dot de
  2005-07-18 14:02 ` pinskia at gcc dot gnu dot org
@ 2005-07-18 14:02 ` pcarlini at suse dot de
  2 siblings, 0 replies; 4+ messages in thread
From: pcarlini at suse dot de @ 2005-07-18 14:02 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From pcarlini at suse dot de  2005-07-18 14:01 -------
My vague idea would be that mudflap already does this (and *much* more). Maybe
a small part of its logic could be moved to a compile-time warning.

-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=22546


^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2005-07-18 14:02 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2005-07-18 13:45 [Bug c/22546] New: does not warn for out-of-bound array access rguenth at gcc dot gnu dot org
2005-07-18 13:46 ` [Bug c/22546] " pcarlini at suse dot de
2005-07-18 14:02 ` pinskia at gcc dot gnu dot org
2005-07-18 14:02 ` pcarlini at suse dot de

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).