public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
From: Joseph Myers <joseph@codesourcery.com>
To: "Martin Liška" <mliska@suse.cz>
Cc: Tomas Kalibera <tomas.kalibera@gmail.com>,
	<gcc-patches@gcc.gnu.org>, Marek Polacek <polacek@redhat.com>,
	<redi@gcc.gnu.org>
Subject: Re: [PATCH] [12/11/10] Fix invalid format warnings on Windows
Date: Wed, 11 May 2022 16:43:14 +0000	[thread overview]
Message-ID: <alpine.DEB.2.22.394.2205111632030.18625@digraph.polyomino.org.uk> (raw)
In-Reply-To: <8f515605-4fc0-148d-3011-a79f672ea025@suse.cz>

On Wed, 11 May 2022, Martin Liška wrote:

> May I please ping review for this?

There are various coding style issues in the patch; at least missing space 
before '(' and '&&' at end of line (should be at start of line).  It will 
also need to be updated for .c files having been renamed to .cc in the GCC 
source tree.

I'd also like to check that "if mingw-w64 is configured to target UCRT" is 
not something that is necessarily known when GCC is built or from the 
command-line options passed to GCC.  Because ideally one might expect the 
TARGET_OVERRIDES_FORMAT_ATTRIBUTES / TARGET_OVERRIDES_FORMAT_INIT 
definitions to handle things appropriately conditionally, so that printf 
attributes are handled as gnu_printf for the "if mingw-w64 is configured 
to target UCRT" case.  Disregarding a built-in format attribute when one 
is also specified explicitly in the header, even though the two are not 
exactly equivalent attributes, as in this patch, seems more like the right 
approach in the case where the attributes in installed header (at the time 
GCC is run, not the time it is built) *are* the way in which GCC gets the 
"configured to target UCRT" information - as opposed to it being something 
available before the header is parsed.

-- 
Joseph S. Myers
joseph@codesourcery.com

  reply	other threads:[~2022-05-11 16:43 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-01-07 18:33 Tomas Kalibera
2022-01-11 13:37 ` Martin Liška
2022-01-12 13:34   ` Tomas Kalibera
2022-01-13  9:40     ` Martin Liška
2022-01-13 11:00       ` Tomas Kalibera
2022-05-11  8:21         ` Martin Liška
2022-05-11 16:43           ` Joseph Myers [this message]
2022-05-12 15:19             ` Martin Storsjö
2022-05-16 11:27             ` Tomas Kalibera
2022-07-04 16:40               ` Jeff Law

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=alpine.DEB.2.22.394.2205111632030.18625@digraph.polyomino.org.uk \
    --to=joseph@codesourcery.com \
    --cc=gcc-patches@gcc.gnu.org \
    --cc=mliska@suse.cz \
    --cc=polacek@redhat.com \
    --cc=redi@gcc.gnu.org \
    --cc=tomas.kalibera@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).