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 <pola...@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...@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