From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id A4262387688F; Wed, 26 Oct 2022 15:27:55 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org A4262387688F DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1666798075; bh=vytkb+WwcFojDob/Rjv6pGhd0CMAX4KtaHPn8SIvxAo=; h=From:To:Subject:Date:In-Reply-To:References:From; b=EFaqaUQyLamnCEtcx7v6I8LL7LxBM+1Gd4BIRjPOxkGGrmfzNFp+fFf/pRn5fc1JD JIo988Y1MvCB6lKy9esM1aSRhslfMCjguAAHDEEHIdGCxWq9tUWOvu5hWwvnaUTRks //pkybddz80yDoM7glnwaYcvDS+EASIcVZtxCdfw= From: "tomas.kalibera at gmail dot com" To: gcc-bugs@gcc.gnu.org Subject: [Bug c/95130] GCC ignoring attribute(format(gnu_printf)) on printf in mingw Date: Wed, 26 Oct 2022 15:27:54 +0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: c X-Bugzilla-Version: 9.1.0 X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: tomas.kalibera at gmail dot com X-Bugzilla-Status: UNCONFIRMED X-Bugzilla-Resolution: X-Bugzilla-Priority: P3 X-Bugzilla-Assigned-To: unassigned at gcc dot gnu.org X-Bugzilla-Target-Milestone: --- X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: attachments.isobsolete attachments.created Message-ID: In-Reply-To: References: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Bugzilla-URL: http://gcc.gnu.org/bugzilla/ Auto-Submitted: auto-generated MIME-Version: 1.0 List-Id: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=3D95130 Tomas Kalibera changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #52007|0 |1 is obsolete| | --- Comment #12 from Tomas Kalibera --- Created attachment 53778 --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=3D53778&action=3Dedit 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 i= s a built in attribute. I am not sure whether this is legal, but it should be e= asy to update it to store the flags somewhere else, if needed.=