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

Martin Liška <marxin at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |marxin at gcc dot gnu.org
   Last reconfirmed|                            |2020-05-27
     Ever confirmed|0                           |1
             Status|UNCONFIRMED                 |WAITING

--- Comment #1 from Martin Liška <marxin at gcc dot gnu.org> ---
With GCC you see:

gcc pr95359.c -c -O2 -Wall -Wextra
pr95359.c: In function ‘f’:
pr95359.c:3:22: warning: zero-length gnu_printf format string
[-Wformat-zero-length]
    3 |     __builtin_printf("", 2);
      |                      ^~

or:

gcc pr95359.c -c -O2 -Wall -Wextra
pr95359.c: In function ‘f’:
pr95359.c:3:22: warning: too many arguments for format [-Wformat-extra-args]
    3 |     __builtin_printf("aa", 2);
      |                      ^~~~

Does it really worth doing an optimization?

Reply via email to