public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
From: Jeff Law <jeffreyalaw@gmail.com>
To: "Даниил Александрович Фролов" <frolov.da@phystech.edu>,
	"Marek Polacek" <polacek@redhat.com>
Cc: "gcc-patches@gcc.gnu.org" <gcc-patches@gcc.gnu.org>
Subject: Re: -Wformat-overflow handling for %b and %B directives in C2X standard
Date: Mon, 28 Nov 2022 10:36:16 -0700	[thread overview]
Message-ID: <96003b33-b899-477a-e414-0b6bbc955e5d@gmail.com> (raw)
In-Reply-To: <1615351662024992@mail.yandex.ru>



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 <gcc-patches@gcc.gnu.org>
> Date:
> 9/1/22, 03:41
> 
> To:
> Marek Polacek <polacek@redhat.com>
> CC:
> "gcc-patches@gcc.gnu.org" <gcc-patches@gcc.gnu.org>
> 
> 
>  From eb9e8241d99145020ec5c050c918c1ad3abc2701 Mon Sep 17 00:00:00 2001
> From: Frolov Daniil<frolov.da@phystech.edu>
> 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.
> 	(tree_digits): Likewise.
> 	(format_integer): Likewise.
> 	(parse_directive): Add cases for %b and %B directives.
> 
> gcc/testsuite/ChangeLog:
> 
> 	* gcc.dg/Wformat-overflow1.c: New test.
Thanks.  I've pushed this to the trunk.

Jeff

      reply	other threads:[~2022-11-28 17:36 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-04-01 19:19 Frolov Daniil
2022-04-01 20:15 ` Marek Polacek
2022-04-06 21:10   ` Frolov Daniil
2022-04-11 21:56     ` Marek Polacek
2022-08-15 16:42       ` Frolov Daniil
2022-08-30 14:56         ` Marek Polacek
2022-09-01  9:41           ` Даниил Александрович Фролов
2022-11-28 17:36             ` Jeff Law [this message]

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=96003b33-b899-477a-e414-0b6bbc955e5d@gmail.com \
    --to=jeffreyalaw@gmail.com \
    --cc=frolov.da@phystech.edu \
    --cc=gcc-patches@gcc.gnu.org \
    --cc=polacek@redhat.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).