From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-oa1-x31.google.com (mail-oa1-x31.google.com [IPv6:2001:4860:4864:20::31]) by sourceware.org (Postfix) with ESMTPS id 56EBA3858D33 for ; Thu, 2 Mar 2023 16:43:32 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 56EBA3858D33 Authentication-Results: sourceware.org; dmarc=pass (p=none dis=none) header.from=linaro.org Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=linaro.org Received: by mail-oa1-x31.google.com with SMTP id 586e51a60fabf-17638494edbso4428522fac.10 for ; Thu, 02 Mar 2023 08:43:32 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1677775411; h=content-transfer-encoding:in-reply-to:organization:from:references :cc:to:content-language:subject:user-agent:mime-version:date :message-id:from:to:cc:subject:date:message-id:reply-to; bh=DFeGPK2nWeieqPXGrh/pXDKapwc9kfx16fskDophcx0=; b=OnkJ2iyLDa6UZ9vrS19TaFm2vB6XpCqi6ne7o4cLebi/2VNTTlhDyZkp1nCLYxArOk cnS8UEHWOz1Kx25QJiLF4cnMj0defqsEZWOml8QX8OT+EFRl9H8mGhA9Z/gCLjdi6XLz Yc1fKl+bctaaI8rZWoLeH+YdAK4pVnMZyF+tkibpPANhlcaqopQJoDNqAkLi2lFduXGn 5I095x6r51Y1e8MHy1wR7NGeukOunXppehT8iGmhIXvBKja/qfMFRaxGhGSRTWBLvt+C xARigZbFMPV1w6x1bXXaITkvqluR5xaoieTGgadfEGKbT+UOn52s5q2fBO88fRhgUOhv sDeg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; t=1677775411; h=content-transfer-encoding:in-reply-to:organization:from:references :cc:to:content-language:subject:user-agent:mime-version:date :message-id:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=DFeGPK2nWeieqPXGrh/pXDKapwc9kfx16fskDophcx0=; b=3hm07Fy1VSHOdLjhkkl1s4Q00dWwQ9XE7OlPM5juL2vql1/aPG6n4zBWcRc/4vLCYy MrqxKYZz3jLvo6hwqKwKVTLmRNbUU332eJgv517jVcEHNGz11M9mo7pkaw+uvbIacFye zMZEh0Jh3IomMzjlt8/6yhx7z0hLDZcjmgn5ieQdg+0vRJYCDLZzIWV31HEhoHf2nrC4 uNuLV3dbFQ3MZlrsoKBJlelvuxzTGYWJmAUZKM3RPzHUuX9YLAknG8FHQZkwrgzw8RV0 GnyZVzyAxjx6FRkTk6fFSkfOviSaJtb0JXisK1m4Sm4g/UyYfdGm0KjIRTwynBU19ndh sVuQ== X-Gm-Message-State: AO0yUKW5RnASrFatuIrB7J8EhAoluVzT4OIseKIplUcysx9Go4xOd1FP oTGaLRbsyWGG0oQ6Mjayap9iKg== X-Google-Smtp-Source: AK7set8v0wd26HN2t9mL3UUBxoSNApBGeIs0fKa5oh1c+LomVJ9u5ISNsCEznkfm2hKkQw5CoLV6oQ== X-Received: by 2002:a05:6870:5804:b0:16e:1230:3aff with SMTP id r4-20020a056870580400b0016e12303affmr6453892oap.7.1677775411329; Thu, 02 Mar 2023 08:43:31 -0800 (PST) Received: from ?IPV6:2804:1b3:a7c3:d849:ed82:aa7c:6d0c:c8ba? ([2804:1b3:a7c3:d849:ed82:aa7c:6d0c:c8ba]) by smtp.gmail.com with ESMTPSA id z21-20020a056870515500b00172721f6cd5sm69333oak.16.2023.03.02.08.43.29 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Thu, 02 Mar 2023 08:43:30 -0800 (PST) Message-ID: Date: Thu, 2 Mar 2023 13:43:28 -0300 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:102.0) Gecko/20100101 Thunderbird/102.8.0 Subject: Re: [v3] C2x scanf binary constant handling Content-Language: en-US To: Joseph Myers , Andreas Schwab Cc: libc-alpha@sourceware.org References: <59ac1e6d-6698-6056-df8c-cf4f83848d@codesourcery.com> From: Adhemerval Zanella Netto Organization: Linaro In-Reply-To: Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-6.3 required=5.0 tests=BAYES_00,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,NICE_REPLY_A,RCVD_IN_DNSWL_NONE,SPF_HELO_NONE,SPF_PASS,TXREP autolearn=ham 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 22/02/23 18:36, Joseph Myers wrote: > 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). > Fair enough, patch LGTM then with the Makefile style changes.