Re: [PATCH] [12/11/10] Fix invalid format warnings on Windows

2022-07-04 Thread Jeff Law via Gcc-patches
On 5/16/2022 5:27 AM, Tomas Kalibera via Gcc-patches wrote: On 5/11/22 18:43, Joseph Myers wrote: 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

Re: [PATCH] [12/11/10] Fix invalid format warnings on Windows

2022-05-16 Thread Tomas Kalibera via Gcc-patches
On 5/11/22 18:43, Joseph Myers wrote: 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. Thanks, I've fixed

Re: [PATCH] [12/11/10] Fix invalid format warnings on Windows

2022-05-12 Thread Martin Storsjö
On Wed, 11 May 2022, Joseph Myers wrote: 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 /

Re: [PATCH] [12/11/10] Fix invalid format warnings on Windows

2022-05-11 Thread Joseph Myers
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 t

Re: [PATCH] [12/11/10] Fix invalid format warnings on Windows

2022-05-11 Thread Martin Liška
On 1/13/22 12:00, Tomas Kalibera wrote: > On 1/13/22 10:40 AM, Martin Liška wrote: > > [...] >> Apart from that, I support the patch (I cannot approve it). Note we're now >> approaching >> stage4 and this is definitelly a stage1 material (opens after GCC 12.1.0 >> gets released). > > Thanks, Ma

Re: [PATCH] [12/11/10] Fix invalid format warnings on Windows

2022-01-13 Thread Tomas Kalibera via Gcc-patches
On 1/13/22 10:40 AM, Martin Liška wrote: [...] Apart from that, I support the patch (I cannot approve it). Note we're now approaching stage4 and this is definitelly a stage1 material (opens after GCC 12.1.0 gets released). Thanks, Martin, I've updated the patch following your suggestions. Ch

Re: [PATCH] [12/11/10] Fix invalid format warnings on Windows

2022-01-13 Thread Martin Liška
On 1/12/22 14:34, Tomas Kalibera wrote: On 1/11/22 2:37 PM, Martin Liška wrote: Hello. I do support the patch, but I would ... Thanks, Martin,  that makes the patch simpler and easier to maintain. Would the attached version do? Thanks Tomas On 1/7/22 19:33, Tomas Kalibera wrote: + 

Re: [PATCH] [12/11/10] Fix invalid format warnings on Windows

2022-01-12 Thread Tomas Kalibera via Gcc-patches
On 1/11/22 2:37 PM, Martin Liška wrote: Hello. I do support the patch, but I would ... Thanks, Martin,  that makes the patch simpler and easier to maintain. Would the attached version do? Thanks Tomas On 1/7/22 19:33, Tomas Kalibera wrote: +  if (is_attribute_p ("format", get_a

Re: [PATCH] [12/11/10] Fix invalid format warnings on Windows

2022-01-11 Thread Martin Liška
Hello. I do support the patch, but I would ... On 1/7/22 19:33, Tomas Kalibera wrote: +  if (is_attribute_p ("format", get_attribute_name (aa)) && +  fndecl && fndecl_built_in_p (fndecl, BUILT_IN_NORMAL)) +{ +  switch (DECL_FUNCTION_CODE (fndecl)) +  

[PATCH] [12/11/10] Fix invalid format warnings on Windows

2022-01-07 Thread Tomas Kalibera via Gcc-patches
Mingw32 targets use ms_printf format for printf, but mingw-w64 when configured for UCRT uses gnu_format (via stdio.h).  GCC then checks both formats, which means that one cannot print a 64-bit integer without a warning. All these lines issue a warning:   printf("Hello %"PRIu64"\n", x); // 1   p