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

Andrew Pinski <pinskia at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
      Known to fail|                            |10.3.0
      Known to work|                            |11.1.0
             Status|UNCONFIRMED                 |NEW
     Ever confirmed|0                           |1
   Last reconfirmed|                            |2021-12-23

--- Comment #1 from Andrew Pinski <pinskia at gcc dot gnu.org> ---
This seems fixed in GCC 11+:

<source>: In function 'h':
<source>:23:26: warning: '%i' directive writing 5 bytes into a region of size 4
[-Wformat-overflow=]
   23 |   __builtin_sprintf (p, "%i", 12345);   // overflow not detected
      |                          ^~
<source>:23:3: note: '__builtin_sprintf' output 6 bytes into a destination of
size 4
   23 |   __builtin_sprintf (p, "%i", 12345);   // overflow not detected
      |   ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

Reply via email to