Re: -Wformat-overflow handling for %b and %B directives in C2X standard

2022-11-28 Thread Jeff Law via Gcc-patches
On 9/1/22 03:41, Даниил Александрович Фролов via Gcc-patches wrote: Subject: Re: -Wformat-overflow handling for %b and %B directives in C2X standard From: Даниил Александрович Фролов via Gcc-patches Date: 9/1/22, 03:41 To: Marek Polacek CC: "gcc-patches@gcc.gnu.org" From

Re: -Wformat-overflow handling for %b and %B directives in C2X standard

2022-09-01 Thread Даниил Александрович Фролов via Gcc-patches
From eb9e8241d99145020ec5c050c918c1ad3abc2701 Mon Sep 17 00:00:00 2001 From: Frolov Daniil Date: Thu, 1 Sep 2022 10:55:01 +0300 Subject: [PATCH] Support %b, %B for -Wformat-overflow (sprintf, snprintf) gcc/ChangeLog: * gimple-ssa-sprintf.cc (fmtresult::type_max_digits): Handle base == 2.

Re: -Wformat-overflow handling for %b and %B directives in C2X standard

2022-08-30 Thread Marek Polacek via Gcc-patches
On Mon, Aug 15, 2022 at 07:42:39PM +0300, Frolov Daniil wrote: > вт, 12 апр. 2022 г. в 00:56, Marek Polacek : > > > > > On Thu, Apr 07, 2022 at 02:10:48AM +0500, Frolov Daniil wrote: > > > Hello! Thanks for your feedback. I've tried to take into account your > > > comments. New patch applied to

Re: -Wformat-overflow handling for %b and %B directives in C2X standard

2022-08-15 Thread Frolov Daniil via Gcc-patches
вт, 12 апр. 2022 г. в 00:56, Marek Polacek : > > On Thu, Apr 07, 2022 at 02:10:48AM +0500, Frolov Daniil wrote: > > Hello! Thanks for your feedback. I've tried to take into account your > > comments. New patch applied to the letter. > > Thanks. > > > The only thing I have not removed is the

Re: -Wformat-overflow handling for %b and %B directives in C2X standard

2022-04-11 Thread Marek Polacek via Gcc-patches
On Thu, Apr 07, 2022 at 02:10:48AM +0500, Frolov Daniil wrote: > Hello! Thanks for your feedback. I've tried to take into account your > comments. New patch applied to the letter. Thanks. > The only thing I have not removed is the check_std_c2x () function. From my > point of view

Re: -Wformat-overflow handling for %b and %B directives in C2X standard

2022-04-06 Thread Frolov Daniil via Gcc-patches
Hello! Thanks for your feedback. I've tried to take into account your comments. New patch applied to the letter. The only thing I have not removed is the check_std_c2x () function. From my point of view -Wformat-overflow shouldn't be thrown if the standard < C2X. So it's protection for false

Re: -Wformat-overflow handling for %b and %B directives in C2X standard

2022-04-01 Thread Marek Polacek via Gcc-patches
On Sat, Apr 02, 2022 at 12:19:47AM +0500, Frolov Daniil via Gcc-patches wrote: > Hello, I've noticed that -Wformat-overflow doesn't handle %b and %B > directives in the sprintf function. I've added a relevant issue in bugzilla > (bug #105129). > I attach a patch with a possible solution to the

-Wformat-overflow handling for %b and %B directives in C2X standard

2022-04-01 Thread Frolov Daniil via Gcc-patches
Hello, I've noticed that -Wformat-overflow doesn't handle %b and %B directives in the sprintf function. I've added a relevant issue in bugzilla (bug #105129). I attach a patch with a possible solution to the letter. From 2051344e9500651f6e94c44cbc7820715382b957 Mon Sep 17 00:00:00 2001 From: