From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from esa1.mentor.iphmx.com (esa1.mentor.iphmx.com [68.232.129.153]) by sourceware.org (Postfix) with ESMTPS id ABE643858C83 for ; Wed, 22 Feb 2023 21:36:16 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org ABE643858C83 Authentication-Results: sourceware.org; dmarc=none (p=none dis=none) header.from=codesourcery.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=mentor.com X-IronPort-AV: E=Sophos;i="5.97,319,1669104000"; d="scan'208";a="101875845" Received: from orw-gwy-01-in.mentorg.com ([192.94.38.165]) by esa1.mentor.iphmx.com with ESMTP; 22 Feb 2023 13:36:14 -0800 IronPort-SDR: JcKJg+B5OTzggzXDhbLKFovTYMn4IZvR9DZEYCUw6FL+Xt8PlgKi5IAVe+jYbsMA4jI34cAXVk fszQ52FJtyEoI/6/He6kU0Bd/O2tFN+Zy4fRqXO0LW5abh1TL9hX9F+OfBJyLs2dxpLVpYhiOk KvRKKacKeae35vfomPcBwUEcv1MLUVWP/cNo01zY14T8u9TSqP4oENa8lagWlnKCrrXbrQYbVS z6pFhT9vnpp9bTM7G2fh3Tx6KjuKwY5TpvbAjwtflT0xongk3PE+En4vv3kT2rymM9TsXDWYnO QsY= Date: Wed, 22 Feb 2023 21:36:10 +0000 From: Joseph Myers To: Andreas Schwab CC: Adhemerval Zanella Netto , Subject: Re: [v3] C2x scanf binary constant handling In-Reply-To: Message-ID: References: <59ac1e6d-6698-6056-df8c-cf4f83848d@codesourcery.com> MIME-Version: 1.0 Content-Type: text/plain; charset="US-ASCII" X-Originating-IP: [137.202.0.90] X-ClientProxiedBy: svr-ies-mbx-12.mgc.mentorg.com (139.181.222.12) To svr-ies-mbx-10.mgc.mentorg.com (139.181.222.10) X-Spam-Status: No, score=-3108.0 required=5.0 tests=BAYES_00,HEADER_FROM_DIFFERENT_DOMAINS,KAM_DMARC_STATUS,SPF_HELO_PASS,SPF_PASS,TXREP autolearn=no autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org List-Id: On Tue, 21 Feb 2023, Andreas Schwab via Libc-alpha wrote: > On Feb 21 2023, Joseph Myers wrote: > > >> Should we also add test for ill formatted inputs? > > > > I don't think there's a real difference here between "ill formatted > > for %i with the new feature" and "ill formatted for %i without the > > feature" - some new cases become accepted with the feature, but > > nothing is an ill formatted input that wasn't already. > > Perhaps add a test with a lone "0b" which at least triggers a new code > path. I tried adding tests for that, but they fail (in C2x mode) because of a pre-existing bug (see bugs 12701 and 18246) with how scanf functions handle input strings that are a prefix of a matching string, but not a matching string themselves (such as "0x" for %i or "1e" for %f, before the addition of this feature, or "0b" in C2x mode after the addition of this feature). -- Joseph S. Myers joseph@codesourcery.com