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

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

           What    |Removed                     |Added
----------------------------------------------------------------------------
   Target Milestone|---                         |11.0
      Known to fail|                            |10.2.0
             Status|ASSIGNED                    |RESOLVED
         Resolution|---                         |FIXED
      Known to work|                            |11.0

--- Comment #4 from Martin Sebor <msebor at gcc dot gnu.org> ---
Resolved by r11-5523 for GCC 11 which prints the following warning and note:

$ gcc -O2 -S pr92940.c
pr92940.c: In function ā€˜gā€™:
pr92940.c:13:8: warning: writing 1 byte into a region of size 0
[-Wstringop-overflow=]
   13 |   p[j] = 0;
      |   ~~~~~^~~
pr92940.c:9:8: note: at offset 4 into destination object ā€˜aā€™ of size [3, 4]
    9 |   char a[n];
      |        ^

Reply via email to