[Bug c/95130] GCC ignoring attribute(format(gnu_printf)) on printf in mingw

tomas.kalibera at gmail dot com gcc-bugzilla@gcc.gnu.org
Wed Oct 26 15:27:54 GMT 2022


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

Tomas Kalibera <tomas.kalibera at gmail dot com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
  Attachment #52007|0                           |1
        is obsolete|                            |

--- Comment #12 from Tomas Kalibera <tomas.kalibera at gmail dot com> ---
Created attachment 53778
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=53778&action=edit
Draft patch to ignore built-in format attribute for a builtin, if there is
another one

This is a draft of an alternative patch, which addresses the concern that in
theory the built in format attribute may not be the first one in the list of
attributes of a built-in function. This patch puts attribute flags inside
TREE_PURPOSE of the attribute, so that it can be checked later whether it is a
built in attribute. I am not sure whether this is legal, but it should be easy
to update it to store the flags somewhere else, if needed.


More information about the Gcc-bugs mailing list