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

Martin Sebor <msebor at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|ASSIGNED                    |RESOLVED
      Known to work|                            |10.0
         Resolution|---                         |FIXED
   Target Milestone|---                         |10.0
      Known to fail|                            |7.3.0, 8.3.0, 9.2.0

--- Comment #4 from Martin Sebor <msebor at gcc dot gnu.org> ---
With the patch GCC 10.0 diagnoses the test case like so:

pr91679.c: In function ‘h’:
pr91679.c:13:7: warning: array subscript 4 is above array bounds of ‘short
int[1]’ [-Warray-bounds]
   13 |   p->a[4] = 4;   // out of bounds, missing warning
      |   ~~~~^~~
pr91679.c:4:9: note: while referencing ‘a’
    4 |   short a[1];
      |         ^

Reply via email to