[Bug c++/57367] Missing warning: array subscript is above array bounds

manu at gcc dot gnu.org gcc-bugzilla@gcc.gnu.org
Sun Apr 3 22:26:00 GMT 2016


https://gcc.gnu.org/bugzilla/show_bug.cgi?id=57367

Manuel López-Ibáñez <manu at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
                 CC|                            |manu at gcc dot gnu.org
         Resolution|---                         |DUPLICATE

--- Comment #8 from Manuel López-Ibáñez <manu at gcc dot gnu.org> ---
A variant that is not optimized out, yet not warned until -O2:

void foo(int *p);
void warning(void)
{
   int pippo[100];
  pippo[1] = 0;
   pippo[100] = 0;
    foo(pippo ) ;
}

also Dup.

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


More information about the Gcc-bugs mailing list