public inbox for libc-alpha@sourceware.org
 help / color / mirror / Atom feed
From: Paul E Murphy <murphyp@linux.ibm.com>
To: "Gabriel F. T. Gomes" <gabriel@inconstante.net.br>,
	libc-alpha@sourceware.org
Subject: Re: [PATCH v3 02/11] ldbl-128ibm-compat: Add ISO C99 versions of scanf functions
Date: Mon, 09 Dec 2019 18:09:00 -0000	[thread overview]
Message-ID: <924787d8-daa3-aca6-c042-908f5b1c4a22@linux.ibm.com> (raw)
In-Reply-To: <20191203170540.18428-3-gabriel@inconstante.net.br>



On 12/3/19 11:05 AM, Gabriel F. T. Gomes wrote:
> From: "Gabriel F. T. Gomes" <gabrielftg@linux.ibm.com>
> 
> 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 <murphyp@linux.ibm.com>


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

  reply	other threads:[~2019-12-09 18:09 UTC|newest]

Thread overview: 27+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-12-03 17:05 [PATCH v3 00/11] Add IEEE long double <-> string functions for powerpc64le Gabriel F. T. Gomes
2019-12-03 17:05 ` [PATCH v3 01/11] ldbl-128ibm-compat: Fix selection of GNU and ISO C99 scanf Gabriel F. T. Gomes
2019-12-09 16:46   ` Paul E Murphy
2019-12-09 16:50     ` Zack Weinberg
2019-12-09 17:09       ` Paul E Murphy
2019-12-09 18:16         ` Gabriel F. T. Gomes
2019-12-09 20:31           ` Paul E Murphy
2019-12-12 13:42             ` Gabriel F. T. Gomes
2019-12-03 17:06 ` [PATCH v3 04/11] Refactor *cvt functions implementation (5/5) Gabriel F. T. Gomes
2019-12-03 17:06 ` [PATCH v3 09/11] ldbl-128ibm-compat: Do not mix -mabi=*longdouble and -mlong-double-128 Gabriel F. T. Gomes
2019-12-03 17:06 ` [PATCH v3 05/11] ldbl-128ibm-compat: Add *cvt functions Gabriel F. T. Gomes
2019-12-09 23:13   ` Paul E Murphy
2019-12-13 20:03     ` Gabriel F. T. Gomes
2019-12-03 17:06 ` [PATCH v3 08/11] Avoid compat symbols for totalorder in powerpc64le IEEE long double Gabriel F. T. Gomes
2019-12-03 17:06 ` [PATCH v3 02/11] ldbl-128ibm-compat: Add ISO C99 versions of scanf functions Gabriel F. T. Gomes
2019-12-09 18:09   ` Paul E Murphy [this message]
2019-12-13 21:13     ` Gabriel F. T. Gomes
2019-12-03 17:06 ` [PATCH v3 10/11] powerpc64le: Require a compiler with -mno-gnu-attribute Gabriel F. T. Gomes
2019-12-03 17:06 ` [PATCH v3 07/11] ldbl-128ibm-compat: Compiler flags for stdio functions Gabriel F. T. Gomes
2019-12-03 17:06 ` [PATCH v3 06/11] Do not redirect calls to __GI_* symbols, when redirecting to *ieee128 Gabriel F. T. Gomes
2019-12-03 17:06 ` [PATCH v3 03/11] Refactor *cvt functions implementation (1-4/5) Gabriel F. T. Gomes
2019-12-09 21:25   ` Paul E Murphy
2019-12-13 20:19     ` Gabriel F. T. Gomes
2019-12-03 17:07 ` [PATCH v3 11/11] RFC: powerpc64le: Enable support for IEEE long double Gabriel F. T. Gomes
2019-12-09 23:47   ` Paul E Murphy
2019-12-13 22:41     ` Gabriel F. T. Gomes
2019-12-13 23:46       ` Paul E Murphy

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=924787d8-daa3-aca6-c042-908f5b1c4a22@linux.ibm.com \
    --to=murphyp@linux.ibm.com \
    --cc=gabriel@inconstante.net.br \
    --cc=libc-alpha@sourceware.org \
    /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).