From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 101937 invoked by alias); 9 Dec 2019 18:09:57 -0000 Mailing-List: contact libc-alpha-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: libc-alpha-owner@sourceware.org Received: (qmail 101872 invoked by uid 89); 9 Dec 2019 18:09:56 -0000 Authentication-Results: sourceware.org; auth=none X-Spam-SWARE-Status: No, score=-22.8 required=5.0 tests=AWL,BAYES_00,GIT_PATCH_0,GIT_PATCH_1,GIT_PATCH_2,GIT_PATCH_3,RCVD_IN_DNSWL_LOW,SPF_PASS autolearn=ham version=3.3.1 spammy= X-HELO: mx0b-001b2d01.pphosted.com Subject: Re: [PATCH v3 02/11] ldbl-128ibm-compat: Add ISO C99 versions of scanf functions To: "Gabriel F. T. Gomes" , libc-alpha@sourceware.org References: <20191203170540.18428-1-gabriel@inconstante.net.br> <20191203170540.18428-3-gabriel@inconstante.net.br> From: Paul E Murphy Message-ID: <924787d8-daa3-aca6-c042-908f5b1c4a22@linux.ibm.com> Date: Mon, 09 Dec 2019 18:09:00 -0000 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.1.0 MIME-Version: 1.0 In-Reply-To: <20191203170540.18428-3-gabriel@inconstante.net.br> Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit X-SW-Source: 2019-12/txt/msg00301.txt.bz2 On 12/3/19 11:05 AM, Gabriel F. T. Gomes wrote: > From: "Gabriel F. T. Gomes" > > Changes since v2: > > - Removed ugly hacks after rebase against commit ID 93486ba583ec. > - Updated copyright years. > - Unified test case for GNU and ISO C99 versions (got rid of many > files in the process, including the new test template for C99). > - Fixed http URLs. > - Updated commit message. > > No changes since v1. > > -- 8< -- > In the format string for *scanf functions, the '%as', '%aS', and '%a[]' > modifiers behave differently depending on ISO C99 compatibility. When > _GNU_SOURCE is defined and -std=c89 is passed to the compiler, these > functions behave like ascanf, and the modifiers allocate memory for the > output. Otherwise, the ISO C99 compliant version of these functions is > used, and the modifiers consume a floating-point argument. This patch > adds the IEEE binary128 variant of ISO C99 compliant functions for the > third long double format on powerpc64le. > > Tested for powerpc64le. > > Reviewed-by: Paul E. Murphy > diff --git a/sysdeps/ieee754/ldbl-128ibm-compat/test-scanf-ldbl-compat-template.c b/sysdeps/ieee754/ldbl-128ibm-compat/test-scanf-ldbl-compat-template.c > index 3dbed79b68..9bdf6daa0b 100644 > --- a/sysdeps/ieee754/ldbl-128ibm-compat/test-scanf-ldbl-compat-template.c > +++ b/sysdeps/ieee754/ldbl-128ibm-compat/test-scanf-ldbl-compat-template.c ... > + /* For ISO C99, scan the single-precision value with "%as" to test > + that __isoc99_*scanf ignores the 's'. For DEPRECATED_SCANF, do not > + use "%as", because that would try to scan a string and allocate > + space for it. */ > +#if __GLIBC_USE (DEPRECATED_SCANF) > +# define FMT "%La %a" > +#else > +# define FMT "%La %as" > +#endif That does simplify the patch nicely. LGTM.